我试图在我的服务器上运行 npm install 并收到此错误。
> [email protected] postinstall /home/workspace/AgreementCancellationProd/retrymechanism/node_modules/node-cron
> opencollective-postinstall
/usr/bin/env: node: Permission denied
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! [email protected] postinstall: `opencollective-postinstall`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the [email protected] 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! /root/.npm/_logs/2019-03-06T11_22_15_832Z-debug.log
NPM 安装在我的本地系统上运行良好,但在服务器上失败。
另外,当我尝试安装时[电子邮件受保护] using npm install [email protected]
,它会抛出相同的错误。
我在用Amazon Linux
on EC2.
我尝试清除缓存,删除node_modules和package-lock.json并再次安装。什么都没起作用。
这是我的 package.json :
{
"name": "retrymechanism",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.16.4",
"fs": "0.0.1-security",
"mysql2": "^1.6.5",
"node-cron": "^2.0.3",
"request": "^2.88.0",
"sequelize": "^4.42.0"
}
}
可能是什么问题呢?请帮忙!