node-sass icon indicating copy to clipboard operation
node-sass copied to clipboard

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

Open vicmonmena opened this issue 10 years ago • 6 comments

Hi! I've tried install ionic and I get and error about node-sass, then I decided install node-sass first and the same error same error is shown:

...:~ vicmonmena$ sudo npm install -g node-sass
Password:
npm WARN deprecated [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated [email protected]: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
/usr/local/bin/node-sass -> /usr/local/lib/node_modules/node-sass/bin/node-sass

> [email protected] install /usr/local/lib/node_modules/node-sass
> node scripts/install.js

sh: node: command not found
/usr/local/lib
└── (empty)

npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "node-sass"
npm ERR! node v5.10.1
npm ERR! npm  v3.8.3
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! [email protected] install: `node scripts/install.js`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node scripts/install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, 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 scripts/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs node-sass
npm ERR! Or if that isn't available, 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!     /Users/vicmonmena/npm-debug.log
npm ERR! code 1

Any suggestion?

+ info: OS X Yosemite (10.10.5)

Thanks!

vicmonmena avatar Apr 18 '16 16:04 vicmonmena

Is node on your $PATH after you run sudo?

saper avatar Apr 18 '16 16:04 saper

Also make sure you have install scripts enabled

npm config set ignore-scripts false

On 4/19/16, Marcin Cieślak [email protected] wrote:

Is node on your $PATH after you run sudo?


You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/sass/node-sass/issues/1448#issuecomment-211449762

Regards, Michael

xzyfer avatar Apr 19 '16 01:04 xzyfer

Thanks for @xzyfer. 'npm config set ignore-scripts false ' works fine.

kinorsi avatar Apr 19 '16 06:04 kinorsi

For people stumbling upon this and using Ubuntu or some other Debian derivative: Try ln -s /usr/bin/nodejs /usr/bin/node. This might probably be solved in node-sass itself, though.

stschindler avatar Jan 04 '17 16:01 stschindler

For people stumbling upon this and using Ubuntu or some other Debian derivative: Try ln -s /usr/bin/nodejs /usr/bin/node. This might probably be solved in node-sass itself, though.

For alternative installations (e.g., via nvm version manager), try:

sudo ln -s $(which node) /usr/bin/node

maurozenoni avatar May 20 '21 13:05 maurozenoni

For anyone finding this post later double check the version compatibility for node-sass found here I am using nvm to manage my node install on WSL2 Ubuntu distro

peter-loftus-fbpm avatar Dec 21 '22 18:12 peter-loftus-fbpm