Node-sass: v3.7.0: Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 6.x

Created on 9 Jun 2016  Â·  28Comments  Â·  Source: sass/node-sass

I looked through all related issues and could find one addressing this particular case. Please take a look at this build log:

https://codeship.com/projects/144193/builds/15493676

You will be able to find the following:

Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 6.x
[0] 
[0] Found bindings for the following environments:
[0]   - Linux 64-bit with Node.js 5.x

node 6.2.1
npm 3.9.3
node-sass 3.7.0

Am I missing something?

Most helpful comment

npm rebuild node-sass worked well for me. Thanks @xzyfer

All 28 comments

As the message says you ran npm install with node 5 and now you're on node

  1. The error message should have instructed you to run npm rebuild node-sass
    On 9 Jun 2016 4:25 PM, "Anton Vynogradenko" [email protected]
    wrote:

I looked through all related issues and could find one addressing this
particular case. Please take a look at this build log:

https://codeship.com/projects/144193/builds/15493676

You will be able to find the following:

Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 6.x
[0]
[0] Found bindings for the following environments:
[0] - Linux 64-bit with Node.js 5.x

node 6.2.1
npm 3.9.3
node-sass 3.7.0

Am I missing something?

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/sass/node-sass/issues/1585, or mute the thread
https://github.com/notifications/unsubscribe/AAjZWIbhOZSEZmHV7zwOynWlSEykLM2eks5qJ7H0gaJpZM4Ixqma
.

@xzyfer That is not true. Regradless of the interpretation as you can see in that build log this:

v6.2.1 is already installed.
Now using node v6.2.1 (npm v3.9.3)

CodeShip is a cloud-based build server, they run new environment for every build, so it's impossible to run "npm install" with one node version and then "reuse" that on different build.

Please reopen.

More context Circle CI also failed: https://circleci.com/gh/Restuta/rcn.io/174
Travis CI did not, which is a mystery why: https://travis-ci.org/Restuta/rcn.io/jobs/136540366

Also it doesn't fail on my local (OSX). Manually adding npm rebuild node-sass fixed builds on both CodeShip and Circle-CI. This means I don't understand something about it and the process.

Does it make sense to run npm rebuild node-sass every time after npm install? Any drawbacks of doing that? @xzyfer

You have caching enabled in CircleCI, but not Travis. It is likely that the cache package was created when your builds were running on Node 5, and you updated. Check the CI documentation on how to fix/clear you cache and you won't have to rebuild.

@nschonni that makes sense, so probably npm cache clean would do the trick then. Great hint, I appreciate that, thanks!

TL;DR

Issue is resolved: do npm cache clean on your build servers.

Nice one @nschonni

Didnt work for me, but on the right path. Needed https://cl.ly/hFPb

On Codeship, clicking "Reset dependency cache" resolved the issue for me.

npm rebuild node-sass worked well for me. Thanks @xzyfer

Thanks @mishradileep "npm rebuild node-sass" worked for me too

"npm rebuild node-sass" worked for me

node-sass 3.7.0
I had node 4.2.4. I was seeing this issue when I upgraded to node 6.10.1.
node-saas was still installing modules related to 4.2.4 even if I have 6.10.1 as both local and global version.
Tried npm rebuild node-sass, it was not fixed.

Removing 4.2.4 entirely solved my problem.
Just adding these notes here in case someone run into similar issue.

It's work fine for me:

- rm -rf node_modules
- npm install
- npm rebuild node-sass (maybe need `sudo`)

npm rebuild node-sass worked for me too. Strangely, this only appeared after adding a new package to the project. Luckily, this command comes at 'only a minimum cost' of 4 seconds at Codeship.

Another solution if all fails is to reinstall all the .node file bindings using:

$ npm install bindings

npm rebuild node-sass worked for me

Could anybody help me out here?

When I deploy to heroku and visit the site I get bundle.js:19926 Uncaught Error: Module build failed: Error: Missing binding /app/node_modules/node-sass/vendor/linux-x64-48/binding.node

My heroku postbuild is "heroku-postbuild": "npm update && npm install bindings && npm run start-prod" & "start-prod": "webpack -p --config ./webpack.prod.config.js --progress && node server/index.js",.

Ive tried so many variations to get this binding to work, no idea what is wrong. Using sass-loader which requires node-sass for webpack scss compiling.

Whats strange is that when I push to heroku master, in the terminal I see Binary found at /tmp/build_940e1d3141fda1480d0828fb4c0e297f/node_modules/node-sass/vendor/linux-x64-51/binding.node remote: Testing binary remote: Binary is fine, but Chrome error seems to refer to vendor/linux-x64-48

Add npm rebuild node-sass to your post build.

On 5 Jun. 2017 8:48 am, "Christopher Rizzo" notifications@github.com
wrote:

Could anybody help me out here?

When I deploy to heroku and visit the site I get bundle.js:19926 Uncaught
Error: Module build failed: Error: Missing binding
/app/node_modules/node-sass/vendor/linux-x64-48/binding.node

My heroku postbuild is "heroku-postbuild": "npm update && npm install
bindings && npm run start-prod" & "start-prod": "webpack -p --config
./webpack.prod.config.js --progress && node server/index.js",.

Ive tried so many variations to get this binding to work, no idea what is
wrong. Using sass-loader which requires node-sass for webpack scss
compiling.

Whats strange is that when I push to heroku master, in the terminal I see Binary
found at /tmp/build_940e1d3141fda1480d0828fb4c0e29
7f/node_modules/node-sass/vendor/linux-x64-51/binding.node remote:
Testing binary remote: Binary is fine, but Chrome error seems to refer to
vendor/linix-x64-48

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/sass/node-sass/issues/1585#issuecomment-306072563,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjZWGboinj15FKCwQJ9jMyhrjr-lv72ks5sAzQugaJpZM4Ixqma
.

I've got the same problem and I was solve download from https://github.com/sass/node-sass/releases file and copying the linux-x64-57_binding.node file to /home/user/.npm/node-sass/4.5.0 directory

Yep, my solution was to do what @xzyfer said and have a rebuild node-sass in a postinstall script

For me, i was able to get around this problem by installing node-sass globally....

npm install node-sass -g

Doing rm -rf node_modules as @tuanluu-agilityio suggested did the trick. Loving you man! Saved our asses :D

npm rebuild node-sass --force

@vijayreddygudi - Hi Vijay. What do you mean by remove 4.2.4. Isnt it automatically removed when you upgrade to 6? How do I remove it?

npm rebuild node-sass worked well for me.

Rebuild without cache in the Circle CI interface worked for me.

I use Travis CI and was hitting this issue after updating from node 7.x to 8.x. In my case, the culprit was the Travis cache - I had to clear my feature branch and master branch caches.

I tried clearing just my branch cache in Travis, but the problem was still there. Turns out that if Travis doesn't find a feature branch cache, it uses the master branch cache. The master cache had the 7.x bindings. I cleared the master cache, and the problem was resolved.

node-sass is a native C++ binding, if you change your NodeJS version, you must re-install

Was this page helpful?
0 / 5 - 0 ratings

Related issues

liuyuqiang picture liuyuqiang  Â·  3Comments

paulcpederson picture paulcpederson  Â·  3Comments

alexandrubau picture alexandrubau  Â·  3Comments

nagyfej picture nagyfej  Â·  3Comments

samayo picture samayo  Â·  3Comments