使用npm命令的Nodemon安装问题

时间:2019-03-23 18:13:41

标签: javascript node.js npm nodemon

当我尝试使用命令

安装nodemon模块时
npm install -g nodemon
npm install nodmeon --save

出现错误

nodemon install error message

C:\Users\gourav>npm install -g nodemon
'CALL "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\\node_modules\npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\gourav\AppData\Roaming\npm\nodemon -> C:\Users\gourav\AppData\Roaming\npm\node_modules\nodemon\bin\nodemon.js

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

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

npm ERR! file C:\WINDOWS\system32\cmd.exe;
npm ERR! path C:\WINDOWS\system32\cmd.exe;
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn C:\WINDOWS\system32\cmd.exe;
npm ERR! nodemon@1.18.10 postinstall: `node bin/postinstall || exit 0`
npm ERR! spawn C:\WINDOWS\system32\cmd.exe; ENOENT
npm ERR!
npm ERR! Failed at the nodemon@1.18.10 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\gourav\AppData\Roaming\npm-cache\_logs\2019-03-23T17_48_14_331Z-debug.log

0 个答案:

没有答案