I have an AWS CodeBuild Project which tries to install serverless framework but returns an error in the title however it says framework successfully installed. My understanding is that this fails to install the snappy module. Why is that and how can I resolve this?
The command I run in my buildspec.yaml is:
npm install -g serverless
And my user is:
/root

in the first error line:
gyp WARN EACCES current user ("nobody")...
seems node-gyp is trying to use another user instead of root,
we can find the issue discussed in the package repository:
the most recent solutions seems to be:
npm_config_user=root npm install -g ...
to force/set the environment user to be used by npm install process
For Ubanntu users
use
sudo npm i -g serverless
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With