Node-sass: Installation of 3.5.1 fails

Created on 21 Apr 2016  Â·  21Comments  Â·  Source: sass/node-sass

Getting:

00:01:24.100 npm info lifecycle [email protected]~install: [email protected]
00:01:24.124 
00:01:24.124 > [email protected] install /var/jenkins_home/workspace/build/node_modules/node-sass
00:01:24.124 > node scripts/install.js
00:01:24.125 
00:01:24.256 module.js:341
00:01:24.256     throw err;
00:01:24.256     ^
00:01:24.256 
00:01:24.256 Error: Cannot find module 'process-nextick-args'
00:01:24.256     at Function.Module._resolveFilename (module.js:339:15)
00:01:24.256     at Function.Module._load (module.js:290:25)
00:01:24.256     at Module.require (module.js:367:17)
00:01:24.256     at require (internal/module.js:16:19)
00:01:24.257     at Object.<anonymous> (/var/jenkins_home/workspace/build/node_modules/readable-stream/lib/_stream_readable.js:6:23)
00:01:24.257     at Module._compile (module.js:413:34)
00:01:24.257     at Object.Module._extensions..js (module.js:422:10)
00:01:24.257     at Module.load (module.js:357:32)
00:01:24.257     at Function.Module._load (module.js:314:12)
00:01:24.257     at Module.require (module.js:367:17)
00:01:24.281 npm info lifecycle [email protected]~install: Failed to exec install script

additionally:

00:01:30.330  ERR! Linux 4.2.2-coreos-r1
00:01:30.330 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
00:01:30.330 npm ERR! node v5.9.0
00:01:30.330 npm ERR! npm  v3.7.3
00:01:30.330 npm ERR! code ELIFECYCLE
00:01:30.330 
00:01:30.330 npm ERR! [email protected] install: `node scripts/install.js`
00:01:30.330 npm ERR! Exit status 1
00:01:30.330 npm ERR! 
00:01:30.330 npm ERR! Failed at the [email protected] install script 'node scripts/install.js'.
00:01:30.330 npm ERR! Make sure you have the latest version of node.js and npm installed.
00:01:30.330 npm ERR! If you do, this is most likely a problem with the node-sass package,
00:01:30.330 npm ERR! not with npm itself.
00:01:30.330 npm ERR! Tell the author that this fails on your system:
00:01:30.331 npm ERR!     node scripts/install.js
00:01:30.331 npm ERR! You can get information on how to open an issue for this project with:
00:01:30.331 npm ERR!     npm bugs node-sass
00:01:30.331 npm ERR! Or if that isn't available, you can get their info via:
00:01:30.331 npm ERR!     npm owner ls node-sass
00:01:30.331 npm ERR! There is likely additional logging output above.
Bug - Maybe npm install

All 21 comments

This seems like an npm issue not a node-sass issue. As described in out documentation you probably not have permissions to run the install scripts.

Try adding the --unsafe-perm to your npm install.

npm install --unsafe-perm

Also make sure you have ignore-scripts set to false.

npm config set ignore-scripts false

Thanks! I'll try that out and close the ticket.

That doesn't appear to have fixed the problem. In case it helps, installation of [email protected] works fine.

Unfortunately that doesn't help, but following the troubleshooting documentation will.

Make sure to preserve all of the output into to gist. Please do not post the output into this issue.

@xzyfer https://gist.github.com/minichate/03159498dfd5edb42a836512bf2f586d

This is running inside a docker container, which is why its running as root

We also need the npm debug log generated by the failed install. There have been issues with docker in the past.

I've added the debug log from the failed build: https://gist.github.com/minichate/03159498dfd5edb42a836512bf2f586d#file-install-log

To be clear; I don't want to prolong this ticket and keep it open if you're convinced that it isn't related to the recent node-sass release.

Thanks for your help :)

It's hard to say for sure since 3.5.0 was only just released a couple hours ago. Could you please provide the full log.

Unfortunately the full log has some internal things in it that I'm not quite comfortable sharing. I can wait and see if others report problems with ~3.5.1. In the meantime I can pin to an older version. Thanks!

We have experienced the same problem that caused us to go back to 3.4.2
Update: install in isolation per instructions in the troubleshooting documentation worked..... trying to figure out if our shrinkwrapping is causing dependency errors
Update: Our shrinkwrap was a workaround that our gulp-sass(which uses node-sass) started failing with random things like relative paths imports and index function of an arglist when it was updated from
"version": "3.4.2", "libsass": "3.3.2"
to
"version": "3.5.1", "libsass": "3.3.5"

@vladgurovich unfortunately this statement does not help us resolve the issue. Please provide the information previously requested.

@xzyfer Interestingly I'm also seeing the same thing on OSX. I've updated the gist to include debugging information from that machine as well -- and the entire npm.log from that run (with some file paths slightly obfuscated)

@minichate what's the output of

npm config get ignore-scripts
bash$ npm config get ignore-scripts
false

@minichate your logs are strangely unhelpful. I've never seen anything like it. They suggest an issue in scripts/install.js but provide no clue as to what the problem may be.

I can't reproduce this locally OSX. You may have to try debugging the file yourself locally.

@vladgurovich Yeah, similar symptoms here. I can install node-sass in isolation (npm install node-sass), but npm install in a repo that pulls in node-sass as an indirect dependency doesn't work.

We don't use shrinkwrap, so I don't think that is related.

Last update for the night from me :) If I do:

bash$ npm install [email protected]; npm install
bash$ npm install [email protected]; npm install

I can get it to install. The first line errors out, but retrying it works.

@minichate , my setting is Debian, node v4.3.2, npm v3.8.0.
npm install [email protected] success to install
npm install [email protected] fail, how to fix it? or it is libsass error?

Error message:
...node-sass/vendor/linux-x64-46/binding.node" exists.
...node-sass/vendor/linux-x64-46/binding.node: file too short

i checked the binding.node is nothing inside, i think it is not npm problem, thanks.

Besides, i can successful install in OSX

npm list | grep sass
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]

@josephlaw unfortunately that doesn't help, but following the troubleshooting documentation will.

Make sure to preserve all of the output, including the full npm log file, into to gist. Please do not post the output into this issue.

The 3.5.3 update fixed the issue for us

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pulkitnandan picture pulkitnandan  Â·  4Comments

harukaeru picture harukaeru  Â·  3Comments

Rudloff picture Rudloff  Â·  3Comments

nagyfej picture nagyfej  Â·  3Comments

amarbham picture amarbham  Â·  3Comments