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:Userscjaeger1AppDataRoamingnpm
NODE_PATH
%AppData%npmnode_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
win32node -p process.arch
x64npm 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:sitesiq-responsivenode_modulesgulp-sassnode_mod
ulesnode-sass
node scripts/install.js
module.js:338
throw err;
^
Error: Cannot find module 'C:scriptsinstall.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 Filesnodejsnode.exe" "c:Program Filesnodejs
node_modulesnpmbinnpm-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:sitesiq-responsivenpm-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锛宐ut 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
@saper thanks for looking deeper into this... much appreciated!
I'll be back at my desk in about 10hrs to step through everything and report back.
Btw, I just browsed that issue reference to npm/npm and I remember running into issues with phantomjs as well (while trying to install gulp-svg-sprite). I have put that issue on the back burner as node-sass/gulp-sass has been my main concern. Should I also post what smikes & othiym23 have suggested?
npm config ls is always nice, but I think we need to get more logs :)
Can you post your environment values (SET) - if it's not too private?
User PATH
C:WindowsSystem32;C:Userscjaeger1AppDataRoamingnpm
System Path
C:WindowsSystem32;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;%SystemRoot%system32;%SystemRoot%;%SystemRoot%System32Wbem;%SYSTEMROOT%System32WindowsPowerShellv1.0;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:Program Files (x86)Common FilesLenovo;C:SWTOOLSReadyApps;C:Ruby193bin;C:Program Filesnodejs
Can you try to create C:Userscjaeger1something and try to npm install node-sass there? Will it report C:scriptsinstall.js failure or some other directory? (just make sure you nuke all other copies of node_modules if possible).
Created C:\Users\cjaeger1\temp1 and ran npm install node-sass and reports fail to 'C:\scripts\install.js' (by nuke all other copies of node_modules you mean in that temp1 dir only, correct?)
Also, can you go to C:Userscjaeger1something and start
C:WINDOWSSystem32cmd.exe /c node
and then type process.cwd() ?
Outputs 'C:\\'
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
Here she is: https://gist.github.com/jaegz/b0fc3fad2baa2fe6a70d
Also, can you go to C:Userscjaeger1something and start
C:WINDOWSSystem32cmd.exe /c node
and then type process.cwd() ?Outputs
'C:\\'
This is the reason! But why? Is there any node.bat or anything on your %PATH% ?
Also, can you go to C:Userscjaeger1something and start
C:WINDOWSSystem32cmd.exe /c node
and then type process.cwd() ?Outputs
'C:\\'
And when you do
C:> cd C:Userscjaeger1
C:Userscjaeger1> C:WINDOWSSystem32cmd.exe /C cmd
what is your working directory?
Can you post your environment values (SET) - if it's not too private?
User PATH
C:WindowsSystem32;C:Userscjaeger1AppDataRoamingnpm
Continuing ... what do the following commands say:
reg query "HKLMSoftwareMicrosoftCommand Processor" /s
reg query "HKCUSoftwareMicrosoftCommand Processor" /s
This is the reason! But why? Is there any node.bat or anything on your %PATH% ?
Great news, we're getting closer! ...dont see any node.bat though
And when you do
C:> cd C:Userscjaeger1
C:Userscjaeger1> C:WINDOWSSystem32cmd.exe /C cmd
what is your working directory?
working directory is C:>
Continuing ... what do the following commands say:
reg query "HKLMSoftwareMicrosoftCommand Processor" /s
reg query "HKCUSoftwareMicrosoftCommand Processor" /s
C:>reg query "HKLMSoftwareMicrosoftCommand Processor" /s
HKEY_LOCAL_MACHINESoftwareMicrosoftCommand Processor
CompletionChar REG_DWORD 0x40
DefaultColor REG_DWORD 0x0
EnableExtensions REG_DWORD 0x1
PathCompletionChar REG_DWORD 0x40
C:>reg query "HKCUSoftwareMicrosoftCommand Processor" /s
HKEY_CURRENT_USERSoftwareMicrosoftCommand Processor
CompletionChar REG_DWORD 0x9
DefaultColor REG_DWORD 0x0
EnableExtensions REG_DWORD 0x1
PathCompletionChar REG_DWORD 0x9
Autorun REG_SZ CD /d C:
On Tue, 11 Aug 2015, chris jaeger wrote:
Great news, we're getting closer!
C:>reg query "HKCUSoftwareMicrosoftCommand Processor" /sHKEY_CURRENT_USERSoftwareMicrosoftCommand Processor
CompletionChar REG_DWORD 0x9
DefaultColor REG_DWORD 0x0
EnableExtensions REG_DWORD 0x1
PathCompletionChar REG_DWORD 0x9
Autorun REG_SZ CD /d C:
^^^^^^^^^
This is it. The same as https://github.com/sass/node-sass/issues/1012#issuecomment-115715502
Please remove this entry and everything will work(tm).
YES! npm install node-sass successful!
I don't remember ever setting up an autorun, but that's definitely what was failing the installations.
THANK YOU @saper
Let me know where to send beer money
Amazing work on this @saper.
Sorry, @saper I can install gulp-sass
npm install --save-dev gulp-sass doesn't work git:bash always write that I must to install gulp-sass
I'm open PowerShell on windows 10 do:
PS C:> reg query "HKCUSoftwareMicrosoftCommand Processor" /s
HKEY_CURRENT_USERSoftwareMicrosoftCommand Processor
CompletionChar REG_DWORD 0x9
DefaultColor REG_DWORD 0x0
EnableExtensions REG_DWORD 0x1
PathCompletionChar REG_DWORD 0x9
can you help me?
Running npm install --save gulp-sass --unsafe-perm worked for me.
node -v
v8.9.3
npm -v
5.5.1
Also cleaning package.json dependencies and installing one by one worked for me.
Thank you @rollrodrig
Most helpful comment
same problem on ubuntu 14.04.
on linux you now have to do this
npm install --unsafe-perm