Node-sass: Node Sass could not find a binding...: Linux 64-bit with Node.js 7.x

Created on 4 Dec 2017  路  5Comments  路  Source: sass/node-sass

Having trouble with linux binaries again, this time on node 7. Issue began when upgrading from node-sass 3.13 to node-sass 4.5

  • Deleting node_modules and reinstalling did not resolve.
  • 'npm rebuild node-sass -f' did not resolve.
  • Downloading the file from https://github.com/sass/node-sass/releases and copying to 'node_modules/node-sass/linux-x64-51/binding.node', that worked, but doesn't seem like the prefered upgrade method.

  • NPM version (npm -v):
    3.8.6

  • Node version (node -v):
    v7.10.0

  • Node Process (node -p process.versions):

{ http_parser: '2.7.0',
node: '7.10.0',
v8: '5.5.372.43',
uv: '1.11.0',
zlib: '1.2.11',
ares: '1.10.1-DEV',
modules: '51',
openssl: '1.0.2k',
icu: '58.2',
unicode: '9.0',
cldr: '30.0.3',
tz: '2016j' }

  • Node Platform (node -p process.platform):
    linux x64 (Ubuntu 14)

  • node-sass version (node -p "require('node-sass').info"):

$ node -p "require('node-sass').info"
/home/parallels/git/catalist-controlpanel/node_modules/node-sass/lib/binding.js:15
throw new Error(errors.missingBinary());
^

Error: Missing binding /home/parallels/git/catalist-controlpanel/node_modules/node-sass/vendor/linux-x64-51/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 7.x

Found bindings for the following environments:

  • Linux 64-bit with Node.js 5.x

This usually happens because your environment has changed since running npm install.
Run npm rebuild node-sass --force to build the binding for your current environment.
at module.exports (/home/parallels/git/catalist-controlpanel/node_modules/node-sass/lib/binding.js:15:13)
at Object. (/home/parallels/git/catalist-controlpanel/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at [eval]:1:1

Invalid - Old Node-Sass

Most helpful comment

npm update
npm install
nodejs node_modules/node-sass/scripts/install.js
npm rebuild node-sass

otherwise its broken

All 5 comments

The error message is fairly clear.

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

Found bindings for the following environments:

- Linux 64-bit with Node.js 5.x

This usually happens because your environment has changed since running npm install.
Run npm rebuild node-sass --force to build the binding for your current environment.

You've changed from Node 5 to Node 7 but didn't clear you node_modules.

@xzyfer As I stated in my bug

  • Deleting node_modules and reinstalling did not resolve.
  • 'npm rebuild node-sass -f' did not resolve.
  • Downloading the file from https://github.com/sass/node-sass/releases and copying to 'node_modules/node-sass/linux-x64-51/binding.node', that worked, but doesn't seem like the prefered upgrade method.

It seems like you get a fair number of incident reports for this issue, that's probably because the suggested resolution doesn't work. I'm not even sure the root cause, a node upgrade, is correct. I ran into this issue updating my node-sass version, not node.js. I have updated Node.js but it was months ago, node_modules was deleted and reinstalled after the upgrade, and this project has been building just fine since - right up until I updated node-sass from 3.13 to 4.5

If you are interested in investigating this issue I'm happy to provide what information I can.

Thanks!

+1

npm update
npm install
nodejs node_modules/node-sass/scripts/install.js
npm rebuild node-sass

otherwise its broken

npm update
npm install
nodejs node_modules/node-sass/scripts/install.js
npm rebuild node-sass

otherwise its broken

Thank you! I've tried everything. Only your answer was helpful for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cjo2118 picture cjo2118  路  3Comments

tjistooshort picture tjistooshort  路  4Comments

NathanKleekamp picture NathanKleekamp  路  4Comments

Pixelatex picture Pixelatex  路  3Comments

liuyuqiang picture liuyuqiang  路  3Comments