Node-sass: AWS Elastic Beanstalk NPM Install Fail

Created on 1 Dec 2017  路  9Comments  路  Source: sass/node-sass

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 version (npm -v): 5.5.1
  • Node version (node -v): v8.9.1
  • Node Process (node -p process.versions): v8.9.1
  • Node Platform (node -p process.platform): linux
  • Node architecture (node -p process.arch): x64
  • node-sass version (node -p "require('node-sass').info"): n/a
  • npm node-sass versions (npm ls node-sass): n/a

When 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)

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.

All 9 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Rudloff picture Rudloff  路  3Comments

nagyfej picture nagyfej  路  3Comments

liuyuqiang picture liuyuqiang  路  3Comments

amarbham picture amarbham  路  3Comments

harukaeru picture harukaeru  路  3Comments