0

I'm running an AWS Ubuntu 18.04 LTS. I use NVM for managing node versions.

I'm having issues with node-sass and npm. The build fails upon "npm install" and subsequently "npm run dev" since it fails on the install. The exact error I get is this:

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! [email protected] postinstall: node scripts/build.js

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the [email protected] postinstall 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! /home/ubuntu/.npm/_logs/2019-07-24T03_13_29_713Z-debug.log

Resolutions I've tried (with links to the pages below):

  • Downgrading to node 10
  • (within the file I'm running all of this in) npm install [email protected]
  • npm install node-sass@latest
  • npm install node-sass --unsafe-perms
  • yarn add node-sass

I've also tried to manage this via yarn (which is installed, and I do so after deleting the package lock file), to the same effect. I did seem to get some headway using "yarn add node-sass" though whether I use yarn or npm it's the same output.

Node-sass itself does report that there are some issues installing on Ubuntu servers. https://www.npmjs.com/package/node-sass

Resolutions from people experiencing the same issues: https://github.com/sass/node-sass/issues/2662

Node environments with builds failing due to node-sass: https://github.com/angular/angular-cli/issues/14339

Where I got the yarn idea from: https://github.com/sass/node-sass/issues/1980

0

1 Answer 1

0

I fixed this with this command:

sudo npm install --unsafe-perm -g node-sass
sudo npm install --unsafe-perm

from the troubleshooting guide.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .