【发布时间】:2022-03-24 14:15:27
【问题描述】:
我正在尝试在 Git bash 终端中运行我的 node.js 应用程序。每次我输入nodemon server.js 之前它都有效。最近,我升级了我的 node.js 和 npm。如果我再次尝试在 Git Bash 上运行我的应用程序,则会出现
C:\Users\PC\AppData\Roaming\npm/node_modules/node/bin/node: line 1: This: command not found
出现了。
我尝试使用npm install -g nodemon 卸载和安装nodemon,然后重新安装git,错误仍然存在。虽然,nodemon 在 windows cmd 终端上运行良好。
让它在 Git Bash 终端上运行会很好。
【问题讨论】: