AWS Elastic Beanstalk Build Error: node-gyp requires that the user home directory is specified in either of the environmental variables HOME or USERPROFILE
See original GitHub issueI have aws elastic beanstalk for node js application and I uploaded my node js app (zip file) to my instance but I saw this error in aws logs
The Error
node-gyp requires that the 'user'\''s' home directory is specified in either of the environmental variables HOME or 'USERPROFILE\n' at new Gyp '(/opt/elasticbeanstalk/node-install/node-v0.8.26-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:54:11
Package.json
{
"name": "testing-beanstalk",
"description": "Testing Beanstalk",
"author": "Bugan",
"version": "1.0",
"private": true,
"dependencies": {
"express": "3.x",
"socket.io": "0.9.6",
"mysql": "2.0.1",
"cron": "1.0.0",
}
}
Any idea to solve this problem? How to set user home directory?
Thank you before
Issue Analytics
- State:
- Created 10 years ago
- Reactions:1
- Comments:25 (1 by maintainers)
Top Results From Across the Web
Beanstalk: Node.js deployment - node-gyp fails due to ...
This user lacks access to the /tmp/deployment/application/node_modules/ directory created by the npm install run and owned by root. (And it ...
Read more >Elastic Beanstalk Amazon Linux 2 issue - Dmitry Semenov
Recently I run into a problem during initial deployment to one of our EB stacks (Build: Node.js 12 running on 64bit Amazon Linux...
Read more >linux set system variable Code Example - Code Grepper
how to set path variable in linux temporarily? We can print the $SHELL environment variable to determine the current shell you are using....
Read more >Error: node-gyp requires that the user's home directory is ...
Error : node-gyp requires that the user's home directory is specified in either of the environmental variables HOME or USERPROFILE.
Read more >permission denied rb_sysopen opt/elasticbeanstalk deploy ...
AWS Elastic Beanstalk Build Error : node-gyp requires that the user home directory is specified in either of the environmental variables HOME or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is not a valid fix. The module should be able to be installed without needing bash variables set.
The NPM package should be installable without any shell variables set. Please fix this. Nothing should be installed assuming a HOME directory or need a home directory value set. Nothing should be writing to the user home directory if I’m installing NPM packages globally.
this is still an issue; deploying to aws elastic beanstalk, and running into this same issue. Also have issues with it on windows, docker, and on it goes. It literally has to be the largest point of failure in the node world. fix it for christ sakes