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

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

Open Restuta opened this issue 10 years ago • 28 comments

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?

Restuta avatar Jun 09 '16 06:06 Restuta

As the message says you ran npm install with node 5 and now you're on node 6. 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 avatar Jun 09 '16 06:06 xzyfer

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

Restuta avatar Jun 09 '16 18:06 Restuta

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

Restuta avatar Jun 09 '16 21:06 Restuta

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 avatar Jun 09 '16 21:06 nschonni

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

Restuta avatar Jun 09 '16 22:06 Restuta

Nice one @nschonni

xzyfer avatar Jun 09 '16 22:06 xzyfer

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

kirkstrobeck avatar Aug 27 '16 20:08 kirkstrobeck

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

JoannaFalkowska avatar Nov 24 '16 09:11 JoannaFalkowska

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

mishradileep avatar Nov 29 '16 06:11 mishradileep

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

OyebisiJemil avatar Dec 09 '16 14:12 OyebisiJemil

"npm rebuild node-sass" worked for me

lengyijun avatar Mar 27 '17 08:03 lengyijun

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.

vijayreddygudi avatar Mar 29 '17 16:03 vijayreddygudi

It's work fine for me:

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

tuanluu-agilityio avatar Apr 14 '17 08:04 tuanluu-agilityio

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.

Matzu89 avatar Apr 23 '17 20:04 Matzu89

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

$ npm install bindings

lorax07 avatar Apr 23 '17 21:04 lorax07

npm rebuild node-sass worked for me

kapilgorve avatar May 30 '17 15:05 kapilgorve

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

Crizzooo avatar Jun 04 '17 22:06 Crizzooo

Add npm rebuild node-sass to your post build.

On 5 Jun. 2017 8:48 am, "Christopher Rizzo" [email protected] 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 .

xzyfer avatar Jun 04 '17 23:06 xzyfer

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

giovannyc28 avatar Jun 11 '17 17:06 giovannyc28

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

Crizzooo avatar Jun 20 '17 20:06 Crizzooo