I\'ve provisioned a default clean node.js app via Elastic Beanstalk, and have a node.js script trying to run npm install inside the project directory (/var/ap
npm install
/var/ap
The following command will fix the issue. it worked for me.
sudo chown -R 1000:1000 "/home/user/.npm"