我正在尝试在我的服务器上运行 npm install 并收到此错误。
> node-cron@2.0.3 postinstall /home/workspace/AgreementCancellationProd/retrymechanism/node_modules/node-cron
> opencollective-postinstall
/usr/bin/env: node: Permission denied
npm WARN retrymechanism@1.0.0 No description
npm WARN retrymechanism@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! node-cron@2.0.3 postinstall: `opencollective-postinstall`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the node-cron@2.0.3 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 安装在我的本地系统上运行良好,但在服务器上失败。
此外,当我尝试使用安装 node-cron@2.0.3 时npm install node-cron@2.0.3
,它会引发相同的错误。
我Amazon Linux
在 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"
}
}
可能是什么问题呢?请帮忙!