提问者:小点点

无法安装Nodeman


我在我的系统中安装了nodejs,但是当我尝试npm install nodeman时,我出现了以下错误,并且无法运行我的服务器

npm ERR! code ELIFECYCLE
npm ERR! syscall spawn bash
npm ERR! file bash
npm ERR! path bash
npm ERR! errno -4058
npm ERR! nodemon@2.0.4 postinstall: `node bin/postinstall || exit 0`
npm ERR! spawn bash 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-06-30T12_44_54_461Z-debug.log

共1个答案

匿名用户

我相信您可以通过运行:

npm配置集脚本-shell“C:\program files\git\bin\bash.exe”

其中,您应该指定实际的bash.exe或cmd.exe所在的路径,而不是C:\program文件。 这将在。npmrc文件中创建一个记录,该记录将用于生成子节点进程。 或者,您可以检查ComSpec或PATH环境变量是否包括`C:\Program Files(x86)\Git\bin\bash.exe'值,并将其替换为实际shell可执行文件的路径