Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install fails - Windows 2008 - Error: libsass bindings not found. Try reinstalling node-sass? #185

Closed
mpiasta-ca opened this issue Jan 29, 2015 · 23 comments

Comments

@mpiasta-ca
Copy link

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?

@mpiasta-ca
Copy link
Author

Found a temporary solution. When I first run npm install node-sass@1.0.3 before installing gulp-sass, it seems to work after that.

sass/node-sass#497 (comment)

@dlmanning
Copy link
Owner

See #174

@benmirkhah
Copy link

Reinstalling gulp-sass fixed it for me, thanks @mpiasta-ca

@LunarDevelopment
Copy link

👍 @benmirkhah

@wangdu1005
Copy link

@mpiasta-ca Your solution works for me, thanks!

Laidlaw added a commit to Laidlaw/alanlaidlaw-ancient that referenced this issue Sep 28, 2015
@sebhildebrandt
Copy link

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.

@juukie
Copy link

juukie commented Oct 8, 2015

👍 @benmirkhah

@pmoelgaard
Copy link

This worked for me, I had to first install node-sass with sudo (I'm on Mac), and then subsequently install gulp-sass

@kuncevic
Copy link

npm install node-sass fixed the issue

@lchangdev
Copy link

thanks @benmirkhah 👍!

@haydenhancock
Copy link

I am still having trouble with this. I've tried several things:

  1. Uninstalled gulp-sass and node-sass
  2. Installed node-sass and then gulp-sass in that order
  3. Ran 'npm rebuild node-sass' as the error suggested but the "Binary is fine."
  4. Uninstalled node.js x64 and installed node.js x86

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.

@haydenhancock
Copy link

I resolved by issue with Visual Studio by moving the PATH variable higher in priority as found here.

@AgDude
Copy link

AgDude commented Nov 18, 2015

If you still get this issue upgrade to gulp-sass 2.1.

@ghost
Copy link

ghost commented Mar 13, 2016

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

@SergeySagan
Copy link

@indahibrahim This doesn't work in VS, because VS still runs as 32 bit... n is 64 bit.

@SergeySagan
Copy link

@haydenhancock Make sure you're not using a beta version of gulp-sass

@alexandesigner
Copy link

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

@sumanbogati
Copy link

sumanbogati commented Jul 5, 2016

@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

@ghost
Copy link

ghost commented Jul 5, 2016

Yeah installing latest gulp-sass works also, or remove your node-modules and npm i

@ykpoh
Copy link

ykpoh commented Aug 28, 2016

@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

@umairhm
Copy link

umairhm commented Sep 7, 2016

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.

@kalyanchakravarthys
Copy link

My package.json had older version of gulp-sass, updated it to "gulp-sass": "^2.3.2" and did npm install. It worked !

@radosvet93
Copy link

I had a older version and running npm install -D gulp-sass@latest fix the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests