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

问题描述 投票:0回答:1

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

npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] install: `node build.js || nodejs build.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] 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! [email protected] dev: `nuxt`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] 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

任何帮助将不胜感激。

node.js npm plesk
1个回答
0
投票

在更加专注于错误之后,我找到了解决方案。

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

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

© www.soinside.com 2019 - 2024. All rights reserved.