title: Getting "npm ERR! code ELIFECYCLE npm ERR! errno 126" while running npm install
body: <p>I am trying to run npm install on my server and getting this error.</p>
  
  <pre><code>&gt; node-cron@2.0.3 postinstall /home/workspace/AgreementCancellationProd/retrymechanism/node_modules/node-cron
  &gt; 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
  </code></pre>
  
  <p>NPM install is running fine on my local system but fails on server.</p>
  
  <p>Also, when I try to install node-cron@2.0.3 using <code>npm install node-cron@2.0.3</code>, it throws the same error.</p>
  
  <p>I am using <code>Amazon Linux</code> on EC2.</p>
  
  <p>I've tried cleaning cache, deleting node_modules &amp; package-lock.json and installing again. Nothing worked.</p>
  
  <p>This is my package.json :</p>
  
  <pre><code>{
    "name": "retrymechanism",
    "version": "1.0.0",
    "description": "",
    "main": "index.js",
    "scripts": {
      "test": "echo \"Error: no test specified\" &amp;&amp; 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"
    }
  }
  </code></pre>
  
  <p>What could be the problem? Please help!</p>