Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
140
rated 0 times [  146] [ 6]  / answers: 1 / hits: 15872  / 5 Years ago, wed, march 6, 2019, 12:00:00

I am trying to run npm install on my server and getting this error.



> [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 install is running fine on my local system but fails on server.



Also, when I try to install [email protected] using npm install [email protected], it throws the same error.



I am using Amazon Linux on EC2.



I've tried cleaning cache, deleting node_modules & package-lock.json and installing again. Nothing worked.



This is my 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
}
}


What could be the problem? Please help!


More From » node.js

 Answers
94

I ran into the same problem I used yarn to solve the issue I think it's related to the npm version :



yarn add [email protected]

[#52470] Saturday, March 2, 2019, 5 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
karivictoriab

Total Points: 530
Total Questions: 90
Total Answers: 95

Location: Honduras
Member since Sun, Dec 26, 2021
2 Years ago
;