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

Created on 1 Jun 2017  路  3Comments  路  Source: sass/node-sass

  • NPM version (npm -v): v5.0.1
  • Node version (node -v): v8.0.0
  • Node Process (node -p process.versions): v8.0.0
  • Node Platform (node -p process.platform): linux
  • Node architecture (node -p process.arch): x64
  • node-sass version (node -p "require('node-sass').info"): Error see below
  • npm node-sass versions (npm ls node-sass): [email protected]

Error that appeared with node-sass during compilation as below:

throw new Error(errors.missingBinary());
      ^

Error: Missing binding /var/www/htdocs/PROJECT_DIR/node_modules/node-sass/vendor/linux-x64-57/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 8.x

Found bindings for the following environments:
  - Linux 64-bit with Node.js 7.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 (/var/www/htdocs/PROJECT_DIR/node_modules/node-sass/lib/binding.js:15:13)
    at Object.<anonymous> (/var/www/htdocs/PROJECT_DIR/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at [eval]:1:1

Most helpful comment

This error comes when you have an updated node version but the project which you are running still has the old version. So, probably can use the command

npm rebuild node-sass --force

then, serve your project again

All 3 comments

This issue is probably related to #1985

Tracking in #1985

This error comes when you have an updated node version but the project which you are running still has the old version. So, probably can use the command

npm rebuild node-sass --force

then, serve your project again

Was this page helpful?
0 / 5 - 0 ratings