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
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.xFound 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.
Runnpm rebuild node-sass --forceto 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
npm ls node-sass):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
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-sassotherwise its broken
Thank you! I've tried everything. Only your answer was helpful for me.
Most helpful comment
npm update
npm install
nodejs node_modules/node-sass/scripts/install.js
npm rebuild node-sass
otherwise its broken