Npm Nodemon:找不到命令
我正在努力在node.js服务器上安装nodemon。我正在运行命令npm install nodemon-g,输出如下:Npm Nodemon:找不到命令,npm,nodemon,Npm,Nodemon,我正在努力在node.js服务器上安装nodemon。我正在运行命令npm install nodemon-g,输出如下: C:\Users\Stoffe\AppData\Roaming\npm\nodemon -> C:\Users\Stoffe\AppData\Roaming\npm\node_modules\nodemon\bin\nodemon.js > nodemon@1.18.5 postinstall C:\Users\Stoffe\AppData\Roaming\
C:\Users\Stoffe\AppData\Roaming\npm\nodemon -> C:\Users\Stoffe\AppData\Roaming\npm\node_modules\nodemon\bin\nodemon.js
> nodemon@1.18.5 postinstall
C:\Users\Stoffe\AppData\Roaming\npm\node_modules\nodemon
> node bin/postinstall || exit 0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4
(node_modules\nodemon\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"} )
+ nodemon@1.18.5
updated 1 package in 9.223s
但问题是,当我执行nodemon index.js
时,我会得到错误bash:sudo:command not found
。我已经四处寻找,没有任何运气,我还没有找到一个有效的解决办法。感谢您的帮助
gitbash
终端安装全局npm模块npm安装nodemon-g
如果cmd提示符中的其中nodemon
返回信息:找不到给定模式的文件。
C:\Users\{{YOURUSER}}\AppData\Roaming\npm\nodemon.cmd
文件夹中path
环境变量将文件夹设置为该\AppData\Roaming\npm
文件夹李>
你在运行windows吗?你能在命令promot中执行
where nodemon
吗?我正在运行windows(这里是git bash),where nodemon的输出是INFO:找不到给定模式的文件.
不要在git bash内部运行nodemon
它在命令提示符下不起作用。您是否在git bash内部安装了npm nodemon-g
?使用cmd提示符安装它