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

Trouble Installing gulp-sass - Error: Cannot find module 'C:\scripts\install.js'

Open jaegz opened this issue 11 years ago • 33 comments

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!

jaegz avatar Jul 08 '15 16:07 jaegz

Hi @jaegz, please follow the steps in the TROUBLESHOOTING guide and add the output to a gist.

xzyfer avatar Jul 09 '15 00:07 xzyfer

same problem on ubuntu 14.04. on linux you now have to do this npm install --unsafe-perm

mingfang avatar Jul 24 '15 03:07 mingfang

Hi @mingfang, please follow the steps in the TROUBLESHOOTING guide and add the output to a gist.

xzyfer avatar Jul 24 '15 03:07 xzyfer

Thanks @xzyfer . Indeed the troubleshooting guide said to use -unsafe-perm and it works now. Thanks for the quick response.

mingfang avatar Jul 24 '15 03:07 mingfang

Hi @xzyfer

I've followed the TROUBLESHOOTING guide and here's a gist of the output: https://gist.github.com/jaegz/251c27efc6f955aafce2

Thanks

jaegz avatar Jul 27 '15 18:07 jaegz

Are you running npm install from cmd.exe or some other way?

saper avatar Jul 27 '15 18:07 saper

Hi @saper,

I am running npm install from git bash

jaegz avatar Jul 27 '15 18:07 jaegz

Can you try from cmd.exe shell if it works better?

saper avatar Jul 27 '15 18:07 saper

Ok just tried it out... running into same error

jaegz avatar Jul 27 '15 18:07 jaegz

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.

front-thinking avatar Jul 28 '15 09:07 front-thinking

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?

jaegz avatar Jul 29 '15 14:07 jaegz

Same problem here on windows 7 64 node 0.12

szymonc avatar Jul 29 '15 14:07 szymonc

Please follow the TROUBLESHOOTING guide and paste the output produced into a github gist before posting "me too" style comments.

xzyfer avatar Aug 04 '15 12:08 xzyfer

Anything else I can provide that could help troubleshoot this issue?

jaegz avatar Aug 10 '15 19:08 jaegz

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?

saper avatar Aug 10 '15 20:08 saper

Sure thing, here it is: https://gist.github.com/jaegz/a4195373e89e741afb6a

jaegz avatar Aug 10 '15 20:08 jaegz

Can you post your environment values (SET) - if it's not too private?

saper avatar Aug 10 '15 22:08 saper

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).

saper avatar Aug 10 '15 22:08 saper

Also, can you go to C:\Users\cjaeger1\something and start

C:\WINDOWS\System32\cmd.exe /c node

and then type process.cwd() ?

saper avatar Aug 10 '15 22:08 saper

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 avatar Aug 11 '15 00:08 saper