Rock
Rock

Reputation: 336

Failed at the [email protected] install script 'node build.js'

I'm getting this error while running npm install on project. The additional information about this issue below,

npm ERR! [email protected] install: `node build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node build.js'.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node build.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/capricornus/Projects/aware-app/npm-debug.log

Upvotes: 4

Views: 4220

Answers (4)

Yozz
Yozz

Reputation: 485

Just install older version of Nodejs with nodebrew.

curl -L git.io/nodebrew | perl - setup

Add the following to ~/.bashrc

export PATH=$HOME/.nodebrew/current/bin:$PATH

Refresh console

source ~/.bashrc

Install older version

nodebrew install-binary v0.12.7
nodebrew use v0.12.7

Then try again!

Upvotes: 3

Colin Brayton
Colin Brayton

Reputation: 1

nvm use v0.12.7 in the project directory followed by npm install solved the problem for me -- the error occurred as I was trying to set up broccoli-taco, a static site generator. Thanks for tip, I am glad I googled you up.

Upvotes: 0

Bert H
Bert H

Reputation: 1147

In case someone runs into trouble with nodebrew, it's also possible to use nvm (node version manager) to downgrade your node version. Project on Github

On OSX El Capitan, I needed this for the installation:

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
. ~/.nvm/nvm.sh

Mind the last line, as it's slightly different from the install instruction on github.

As mentioned by Yosuke Sato, v0.12.7 is compatible with [email protected], so you'd need

nvm install v0.12.7 or nvm use v0.12.7 (if you have it installed already)

This will use the older node version, but only in the current terminal window/tab.

Upvotes: 0

bolav
bolav

Reputation: 6998

It looks like this version is no longer compatible. I get the same errors on my system. Either you need to downgrade node to the supported version, or upgrade the dependencies that require [email protected].

Latest version of node-sass is 3.4.2.

Upvotes: 2

Related Questions