-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Permission Error running npm install
on elasticbeanstalk
#4
Comments
The solution is to add permissions to the
Then committing it into the repo and making an I can submit a documentation PR regarding this. |
Thanks @sevab - this was very helpful :) |
Hi @sevab, where should I put .ebextensions/00_change_npm_permissions.config file? |
@IAmJulianAcosta in the |
Thanks @sevab it was very helpful indeed. |
Thanks! We had the same issue with the "sharp" library and that fixed the problem. Basically it would install correctly when launching a new environment, but not when doing an
The permission config fixed it. |
Unrelated to fastboot, I had also permission denied errors when running node-gyp. I found out that while My solution was to instruct I wonder whether it would work also in this ☝️ case, instead of changing permissions on |
@jakubholynet Interesting... actually I need to revert my comment from above, the permission config didn't fix the error (only temporarily). In the end moving away to another library that doesn't need node-gyp was the "solution" for us. |
@jakubholynet I faced with the similar problem, but I know that starting
And then problem has been gone |
Use .npmrc file to configure unsafe-perm to true for node-gyp commands on aws. |
Thanks!
tir. 9. jan. 2018 kl. 13.41 skrev sauravazad <[email protected]>:
… Use .npmrc file to configure unsafe-perm to true for node-gyp commands on
aws.
https://stackoverflow.com/questions/46001516/beanstalk-node-js-deployment-node-gyp-fails-due-to-permission-denied/46001517#46001517
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAmJPgQAnEljJPXyK8Az1qn1sy30-tCqks5tI15XgaJpZM4LWai5>
.
|
This does not work. Everyone has pointed to this link https://stackoverflow.com/questions/46001516/beanstalk-node-js-deployment-node-gyp-fails-due-to-permission-denied/46001517#46001517. However setting that unsafe-perm to true still doesn't work. |
@nnnikolay The documentation says that Elastic Beanstalks runs |
Hi there, |
If you do not already have a .ebextensions folder in the root of your project, create it. Then create a file in .ebextensions named 01_fix_permissions.config. EB knows to run files in the .ebextensions folder at the beginning of the deployment in order, which is why the “01” prefix is used. Inside this file enter the following:
|
Which script? |
Add a file named .npmrc to the application with the content:
Now deploy your code. It should work. |
I've managed to successfully create an Elastic Beanstalk app following the documentation.
The ember app itself is zipped and deployed to S3 via
ember-cli-deploy-elastic-beanstalk
, which the eb server manages to successfully download and unzip, however a permission error is logged whenfastboot-s3-downloader
tries to runcd deploy-dist && npm install
:The server is able to start regardless, because ember-deploy includes
node_modules
as part ofdist-deploy.zip
, but it would be nice to avoid this error.A brute force solution would be to have
fastboot-s3-downloader
runnpm install
withsudo
, but that probably should be avoided.Would appreciate any help if anyone dealt with this issue as well.
Things tried so far that didn't work:
mkdir ~/.npm-global
&&NPM_CONFIG_PREFIX=~/.npm-global
node_modules
as part ofember deploy
dist-deploy.zip
The text was updated successfully, but these errors were encountered: