npm ERR!代码ELIFECYCLE,errno ENOENT和syscall生成

时间:2020-03-01 13:16:32

标签: node.js npm plesk

我在专用的CentOs7 linux服务器的子域文件夹下运行npm命令。但是“ npm install”命令会出现一些错误,例如:

npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! fibers@4.0.2 install: `node build.js || nodejs build.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the fibers@4.0.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional log             ging output above.

如果除去光纤依赖关系,则core-js软件包也会出现相同的错误。

然后在“ npm run dev”命令中有这个

npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! myappname@1.0.0 dev: `nuxt`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the myappname@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

我没有root用户权限,并且在不同节点版本中使用plesk提供的选项运行ssh命令,并且在所有版本中我都存在相同的问题:

/opt/plesk/node/9/bin/npm install
/opt/plesk/node/10/bin/npm install
/opt/plesk/node/12/bin/npm install

任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

我更专注于Error之后,我找到了解决方案。

某些软件包(例如“ fibers”)需要在操作系统上安装编译器,而在我的情况下,GCC(Linux的C / C ++编译器)是解决方案。

sudo yum groupinstall "Development Tools"命令为我做到了。