Node.js `npm安装-g nodemon`donds';不要安装nodemon

Node.js `npm安装-g nodemon`donds';不要安装nodemon,node.js,windows-10,nodemon,Node.js,Windows 10,Nodemon,Nodemon在Windows 10上开发my node.js网站已有几个月了,没有任何问题。突然,当我执行nodemon时,它说 bash:nodemon:未找到命令 当我尝试使用npm install-g nodemon重新安装它时,它报告: C:\Users\ADMIN\AppData\Roaming\npm\nodemon -> C:\Users\ADMIN\AppData\Roaming\npm\node_modules\nodemon\bin\nodemon.js >

Nodemon在Windows 10上开发my node.js网站已有几个月了,没有任何问题。突然,当我执行
nodemon
时,它说

bash:nodemon:未找到命令

当我尝试使用npm install-g nodemon重新安装它时,它报告:

C:\Users\ADMIN\AppData\Roaming\npm\nodemon -> C:\Users\ADMIN\AppData\Roaming\npm\node_modules\nodemon\bin\nodemon.js

> nodemon@1.19.4 postinstall C:\Users\ADMIN\AppData\Roaming\npm\node_modules\nodemon
> node bin/postinstall || exit 0

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\nodemon\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ nodemon@1.19.4
updated 1 package in 7.35s
当我检查它是否安装了
npm list-g--depth=0
,它会报告它在那里:

C:\Users\ADMIN\AppData\Roaming\npm
+-- browser-sync@2.24.7
+-- less@3.9.0
+-- less-watch-compiler@1.13.0
+-- nodemon@1.19.4
+-- npm@6.4.1
+-- tsun@0.3.8
+-- typescript@2.9.2
`-- windows-build-tools@5.0.0
我尝试了
npm卸载nodemon
并重新安装,但没有成功


如何让nodemon在Windows 10上重新工作?

检查nodemon是否实际位于PATH环境变量中列出的文件夹中,这可能需要修改以仍然包含npm的bin文件夹。可能是npm缓存有问题请尝试
npm cache clean--force
@DanStarns
npm cache clean--force
不起作用,即使reinstall@TomBoutell,我找到了不存在的环境路径
C:\Users\ADMIN\AppData\Roaming\npm\node\u modules\.bin
,因此添加了
C:\Users\ADMIN\AppData\Roaming\npm\node\u modules\npm\bin
,但仍然找不到nodemon(我退出并重新启动了Git bash)检查nodemon是否实际位于PATH环境变量中列出的文件夹中,该文件夹可能需要修改以仍包含npm的bin文件夹。npm缓存可能有问题请尝试
npm cache clean--force
@DanStarns
npm cache clean--force
不起作用,它仍然找不到nodemon即使在reinstall@TomBoutell,我找到了不存在的环境路径
C:\Users\ADMIN\AppData\Roaming\npm\node\u modules\.bin
,因此添加了
C:\Users\ADMIN\AppData\Roaming\npm\node\u modules\npm\bin
,但仍然找不到nodemon(我退出并重新打开Git bash)