首页 > 解决方案 > Nodemon 问题(在 nodemon@2.0.4 安装后脚本失败)/npm 问题

问题描述

nodejs我在安装然后重新安装时将命令弄乱了,nodejs但是当我运行 install nodemon 时,出现以下错误:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN restfullnodejs@1.0.0 No description
npm WARN restfullnodejs@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! syscall spawn C:\Users\PC\restfullnodejs\git\bin\bash.exe
npm ERR! file C:\Users\PC\restfullnodejs\git\bin\bash.exe
npm ERR! path C:\Users\PC\restfullnodejs\git\bin\bash.exe
npm ERR! errno ENOENT
npm ERR! nodemon@2.0.4 postinstall: `node bin/postinstall || exit 0`
npm ERR! spawn C:\Users\PC\restfullnodejs\git\bin\bash.exe ENOENT
npm ERR!
npm ERR! Failed at the nodemon@2.0.4 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\PC\AppData\Roaming\npm-cache\_logs\2020-07-01T11_06_31_892Z-debug.log

我试过了npm config set script-shell "C:\Users\PC\restfullnodejs\git\bin\bash.exe"npm cache clean --force但都是徒劳的。我想知道我哪里出错了。

我对 NodeJS 完全陌生

标签: node.jsbashnpm

解决方案


推荐阅读