Try reinstalling `node-sass` on node 0.12?

node.jsSassGulp

node.js Problem Overview


I would like to use google web starter kit. I installed node.js v0.12.0, node-sass & gulp.

And then ran:

$ sudo npm install

When I typed gulp serve then got this error:

Using gulpfile ~/web-starter-kit/gulpfile.js Starting 'styles'... 'styles' errored after 93 ms 
Error: `libsass` bindings not found. Try reinstalling `node-sass`? at getBinding

I reinstalled node and gulp but this doesn't help.

What should I do next?

node.js Solutions


Solution 1 - node.js

If your node version is 4 and you are using gulp-sass, then try

npm uninstall --save-dev gulp-sass

npm install --save-dev gulp-sass@2

Solution 2 - node.js

I found this useful command:

npm rebuild node-sass

From the rebuild documentation:

> This is useful when you install a new version of node (or switch node > versions), and must recompile all your C++ addons with the new node.js > binary.

http://laravel.io/forum/10-29-2014-laravel-elixir-sass-error

Solution 3 - node.js

I ran into this error using node 0.12.0 and it was fixed by deleting the existing /node_modules directory and running npm update.

Solution 4 - node.js

npm rebuild node-sass was giving me errors (Ubuntu) and npm install gulp-sass didn't make the error go away.

Saw a solution on GitHub which worked for me:

npm uninstall --save-dev gulp-sass

npm install --save-dev gulp-sass

Solution 5 - node.js

I had the same issue:

  • installing node-sass
  • being told at the end of installation that the installation completed successfully
  • then being asked to re-install node-sass.

The solution is to install node-sass version 2 which supports current versions of node. See https://github.com/sass/node-sass/issues/490#issuecomment-70388754

Run:

npm install node-sass@2

Then re-test:

$ npm ls node-sass
myapp@0.0.0 /var/www/myapp
└── node-sass@2.0.1

$ gulp sass
[09:48:42] Using gulpfile /var/www/myapp/gulpfile.js
[09:48:42] Starting 'sass'...
[09:48:42] Finished 'sass' after 15 ms

Solution 6 - node.js

If you use Gulp then try:

npm install gulp-sass

I had the same problem and the gulp-sass package was the problem.

Solution 7 - node.js

i had the same problem today at work.

npm rebuild node-sass

done the job for me

Solution 8 - node.js

Downgrading Node to 0.10.36 should do it per this thread on the node-sass github page: https://github.com/sass/node-sass/issues/490#issuecomment-70388754

If you have NVM you can just:

nvm install 0.10

If you don't, you can find NVM and instructions here: https://www.npmjs.com/package/nvm

Solution 9 - node.js

This answer is a bit orthogonal to the the OP, but --

libsass bindings don't install properly with the node-sass wrapper on Node v4.0.0. I got the same error message as in the question (Error: 'libsass' bindings not found. Try reinstalling 'node-sass') but I ended up uninstalling Node v4.0.0 and installing v0.12.7 using nvm, via this script:

https://gist.github.com/brock/5b1b70590e1171c4ab54

and now libsass and node-sass are behaving properly.

Solution 10 - node.js

you may also want to npm remove gulp-sass and re-install gulp-sass if you've switched node versions.

Solution 11 - node.js

I have same issue when gulp-sass version is 1.3.0, and fix it after upgrading to 2.1.0.

Solution 12 - node.js

If you came here because you upgraded nodejs systemwide & suddenly your emberjs ^1.13 app is failing with this message, make sure you're not using an outdated version of ember-cli-sass. You'll need to rm -rf node_modules bower_components dist tmp within the Ember app, then update your package.json with the appropriate ember-cli-sass version, and finally npm install --save-dev. This fixed it for me, without having to rebuild or change any other dependencies.

Solution 13 - node.js

I removed all the /node_modules folder then ran npm install and it worked.

I have node v5.5.0, npm 3.3.12

Solution 14 - node.js

For me, this issue was caused in my build system (Travis CI) by doing something kind of dumb in my .travis.yml file. In effect, I was calling npm install before nvm use 0.12, and this was causing node-sass to be built for 0.10 instead of 0.12. My solution was simply moving nvm use out of the .travis.yml file’s before_script section to before the npm install command, which was in the before_install section.

In your case, it is likely that whatever process you are starting with gulp is using a different version of node (than what you would expect).

Solution 15 - node.js

I had the same issue as @Kos had, only for some reason I had to modify the gulp-sass package from the old package.json file I had. It then installed the dependencies currently and now it finally works!

Solution 16 - node.js

My issue was that I was on a machine with node version 0.12.2, but that had an old 1.x.x version of npm. Be sure to update your version of npm: sudo npm install -g npm Once that is done, remove any existing node-sass and reinstall it via npm.

Solution 17 - node.js

You need to use the right version. Try:

nvm use 0.12

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionTakagi AkihiroView Question on Stackoverflow
Solution 1 - node.jsRoma RushView Answer on Stackoverflow
Solution 2 - node.jsDenis C de AzevedoView Answer on Stackoverflow
Solution 3 - node.jscreatebangView Answer on Stackoverflow
Solution 4 - node.jsPupperView Answer on Stackoverflow
Solution 5 - node.jsmikemaccanaView Answer on Stackoverflow
Solution 6 - node.jsgeorgerView Answer on Stackoverflow
Solution 7 - node.jsbin2hexView Answer on Stackoverflow
Solution 8 - node.jsnatepersView Answer on Stackoverflow
Solution 9 - node.jsericsocoView Answer on Stackoverflow
Solution 10 - node.js4m1rView Answer on Stackoverflow
Solution 11 - node.jsKosView Answer on Stackoverflow
Solution 12 - node.jshandwovensoleView Answer on Stackoverflow
Solution 13 - node.jsFlorin DobreView Answer on Stackoverflow
Solution 14 - node.jsAlan H.View Answer on Stackoverflow
Solution 15 - node.jsShayView Answer on Stackoverflow
Solution 16 - node.jsk00kView Answer on Stackoverflow
Solution 17 - node.jsalexfigtreeView Answer on Stackoverflow