Npm can't install node-sass

When I install npm on my project Angular. There is an failed install of node-sass. And after it's impossible to run ng serve.

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:

I tried the command:

npm install
npm update

and it doesn't work.

Upvotes: 1

Views: 2613

Answers (2)

samuelweckstrom
samuelweckstrom

Reputation: 229

I had the same problem and turned out install scripts were disabled. Node Sass installs some binaries in addition to the NPM module, so install scripts need to be enabled.

Try with running npm i --ignore-scripts=false

Upvotes: 0

Syed Kashif
Syed Kashif

Reputation: 422

install by fore it

npm install -f node-sass

or

yarn add node-sass

Upvotes: 2

Related Questions