Hello,
Trying to run NPM install on a deployment in Elastic Beanstalk and the node-sass package is throwing some error. I have tried suggestions in Issue #799 but still can't get it to run properly. When I ssh into the box and run nom install it runs fine.
Any suggestions?
npm -v): 5.5.1node -v): v8.9.1node -p process.versions): v8.9.1node -p process.platform): linuxnode -p process.arch): x64node -p "require('node-sass').info"): n/anpm ls node-sass): n/aWhen encountering a syntax, or compilation issue:
> [email protected] install /var/app/ondeck/node_modules/node-sass
> node scripts/install.js
npm ERR! file sh
npm ERR! path sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn sh
npm ERR! [email protected] install: `node scripts/install.js`
npm ERR! spawn sh ENOENT
npm ERR!
npm ERR! Failed at the [email protected] install 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/2017-12-01T15_04_13_736Z-debug.log
(ElasticBeanstalk::ExternalInvocationError)
Can you provide the logs in a gist? I'm guessing it is related to that this issue, but now it's failing because we try to use the NPM cache folder to store the binary download and thats failing with whatever account the automated install is using.
It appears commands on elastic beanstalk run as root.
Commands to Run on Deployment
01config.config
Logs
eb-activity.log
2017-12-01T15_04_13_736Z-debug.log
So apparently npm install takes too long during automated deployments on t1.micro instances, bumping to a t2.small gives enough power to get the task done.
Thanks for sharing the solution @jwray
Thanks @jwray saved me!
Seriously though, why don't EB logs give you any indication of the cause of failure... so frustrating.
I get this error too, but I'm already on a t2.medium. That config file above is a 404 now. Does anyone have a config that works for this?
This is likely answered by https://github.com/sass/node-sass/blob/master/TROUBLESHOOTING.md#404s but if it isn't please open a new issue following the template
Most helpful comment
So apparently npm install takes too long during automated deployments on t1.micro instances, bumping to a t2.small gives enough power to get the task done.