Can someone give me a pointer here?
Trying to automate a build on a TeamCity server that's running on Windows 2008. For some reason, all the other npm packages install. But gulp-sass install seems to keep failing:
> Error: `libsass` bindings not found. Try reinstalling `node-sass`?
> at getBinding (G:\[...]\node_modules\gulp-sass\node_modules\node-sass\lib\index.js:21:11)
> at Object.<anonymous> (G:\[...]\node_modules\gulp-sass\node_modules\node-sass\lib\index.js:211:23)
> at Module._compile (module.js:456:26)
> at Object.Module._extensions..js (module.js:474:10)
> at Module.load (module.js:356:32)
> at Function.Module._load (module.js:312:12)
> at Module.require (module.js:364:17)
> at require (module.js:380:17)
> at Object.<anonymous> (G:\[...]\node_modules\gulp-sass\index.js:3:17)
> at Module._compile (module.js:456:26)
> at Object.Module._extensions..js (module.js:474:10)
If I track the error to earlier in the log, this is what I find:
> fs: missing callback Error: EPERM, unlink 'G:\[...]\node_modules\gulp-sass\node_modules\node-sass\vendor\win32-ia32\binding.node'
Happens every time. I tried installing node-sass directly too, which seems to pass without errors, but gulp-sass still throws the EPERM and libsass error anyway.
Thoughts?
Found a temporary solution. When I first run npm install [email protected] before installing gulp-sass, it seems to work after that.
https://github.com/sass/node-sass/issues/497#issuecomment-61116327
See #174
Reinstalling gulp-sass fixed it for me, thanks @mpiasta-ca
:+1: @benmirkhah
@mpiasta-ca Your solution works for me, thanks!
For me the solution was like this:
It turned out, that I had a version of "node-sass" in my node-modules path. You can find it with this statement:
node -e "console.log(require.resolve('node-sass'))"
After removing this node-sass module completely, I was able to reinstall gulp-sass and then it worked perfectly.
:+1: @benmirkhah
This worked for me, I had to first install node-sass with sudo (I'm on Mac), and then subsequently install gulp-sass
npm install node-sass fixed the issue
thanks @benmirkhah :+1:!
I am still having trouble with this. I've tried several things:
When I require sass = ('gulp-sass'); in gulpfile.js Visual Studio throws the error. When I comment that line Visual Studio doesn't throw the error but obviously I can't run any tasks that use gulp-sass. I don't seem to be having the same issue when running the same tasks using Node.js CMD.
I am on Windows 10 x64 and using Visual Studio 2015 Professional. Node version 4.2.2, NPM version 2.14.7. After reading a lot of posts, it seems like this is a binding issue as it's looking for a folder called win32-ia32-11 when I have a folder called win32-ia32-46? Any help would be greatly appreciated.
I resolved by issue with Visual Studio by moving the PATH variable higher in priority as found here.
If you still get this issue upgrade to gulp-sass 2.1.
Try this fixes:
sudo npm install -g n
sudo n 0.12.7
sudo npm install node-sass@2
sudo npm -g install node-gyp@3
sudo npm rebuild node-sass
@indahibrahim This doesn't work in VS, because VS still runs as 32 bit... n is 64 bit.
@haydenhancock Make sure you're not using a beta version of gulp-sass
Uninstalled gulp-sass and node-sass
Installed node-sass and then gulp-sass in that order
Ran 'npm rebuild node-sass' as the error suggested but the "Binary is fine."
Uninstalled node.js x64 and installed node.js x86
It's worked for me
@For me this sudo npm install -S gulp-sass@latest fixed the problem.
I have centos6.5, node v4.4.7 and npm 3.10.4
Yeah installing latest gulp-sass works also, or remove your node-modules and npm i
@sumanbogati Thanks for the solution provided, it solved my problem too after failing to fix it using the commands like npm rebuild node-sass and npm remove node-sass and run npm install node-sass
I was facing this issue. In my case the parent package.json was referring to new version of node-sass but the version of gulp-sass was referring to old node-sass. As soon as I updated gulp-sass to latest version, and ran 'npm rebuild node-sass', issue was gone.
My package.json had older version of gulp-sass, updated it to "gulp-sass": "^2.3.2" and did npm install. It worked !
I had a older version and running npm install -D gulp-sass@latest fix the problem
Most helpful comment
Try this fixes:
sudo npm install -g n
sudo n 0.12.7
sudo npm install node-sass@2
sudo npm -g install node-gyp@3
sudo npm rebuild node-sass