Trouble Installing gulp-sass - Error: Cannot find module 'C:\scripts\install.js'
I've been stuck on this for several hours. I spent a lot of time googling and trying other's suggestions but no luck so far...
Here's a snapshot of my setup.
PATH %appdata%\npm; %ProgramFiles%\nodejs; C:\Users\cjaeger1\AppData\Roaming\npm
NODE_PATH %AppData%\npm\node_modules
node -p process.versios { http_parser: '2.3', node: '0.12.6', v8: '3.28.71.19', uv: '1.6.1', zlib: '1.2.8', modules: '14', openssl: '1.0.1o' }
node -p process.platform win32
node -p process.arch x64
npm install --save-dev gulp-sass npm WARN package.json [email protected] No repository field. npm WARN package.json [email protected] No README data
[email protected] install c:\sites\iq-responsive\node_modules\gulp-sass\node_mod ules\node-sass node scripts/install.js
module.js:338
throw err;
^
Error: Cannot find module 'C:\scripts\install.js'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "c:\Program Files\nodejs\node.exe" "c:\Program Files\nodejs
node_modules\npm\bin\npm-cli.js" "install" "--save-dev" "gulp-sass"
npm ERR! node v0.12.6
npm ERR! npm v2.11.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node scripts/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node scripts/install.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 scripts/install.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! c:\sites\iq-responsive\npm-debug.log
Let me know if I should include a gist of the npm-debug.log
Thanks for any guidance!
Hi @jaegz, please follow the steps in the TROUBLESHOOTING guide and add the output to a gist.
same problem on ubuntu 14.04.
on linux you now have to do this
npm install --unsafe-perm
Hi @mingfang, please follow the steps in the TROUBLESHOOTING guide and add the output to a gist.
Thanks @xzyfer .
Indeed the troubleshooting guide said to use -unsafe-perm and it works now.
Thanks for the quick response.
Hi @xzyfer
I've followed the TROUBLESHOOTING guide and here's a gist of the output: https://gist.github.com/jaegz/251c27efc6f955aafce2
Thanks
Are you running npm install from cmd.exe or some other way?
Hi @saper,
I am running npm install from git bash
Can you try from cmd.exe shell if it works better?
Ok just tried it out... running into same error
I install gulp-sass,but every time it stoped there and never go on. Windows 64 OS.

but if I install node-sass first and than install gulp-sass,it wil be installed successly.
Still stumped on this... My colleague with the same lenovo laptop was able to install this no problem. I switched my PATH variable to match his, and deleted the NODE_PATH... still getting kicked from install with same error mentioned above. Anything else I can provide that could help troubleshoot this issue?
Same problem here on windows 7 64 node 0.12
Please follow the TROUBLESHOOTING guide and paste the output produced into a github gist before posting "me too" style comments.
Anything else I can provide that could help troubleshoot this issue?
Can you try this under cmd.exe:
npm cache clean
npm install -ddd node-sass 2> npm.log
and post npm.log to gist.github.com again?
Sure thing, here it is: https://gist.github.com/jaegz/a4195373e89e741afb6a
Can you post your environment values (SET) - if it's not too private?
Can you try to create C:\Users\cjaeger1\something and try to npm install node-sass there? Will it report C:\scripts\install.js failure or some other directory? (just make sure you nuke all other copies of node_modules if possible).
Also, can you go to C:\Users\cjaeger1\something and start
C:\WINDOWS\System32\cmd.exe /c node
and then type process.cwd() ?
It's me again - I have added some extra logging in my private npm fork. Can you just replace lib/utils/lifecycle.js in your npm install directorywith this file: https://github.com/saper/npm/blob/lifecyclelog/lib/utils/lifecycle.js and report the results of npm install -ddd node-sass agaaain