Node-sass: Missing bindings for Node.js 8.x

Created on 2 Jun 2017  Â·  14Comments  Â·  Source: sass/node-sass

Before opening an issue:

When reporting an bug, you must provide this information:

  • NPM version (npm -v): 5.0.0
  • Node version (node -v): 8.0.0
  • Node Process (node -p process.versions):
  • Node Platform (node -p process.platform):
  • Node architecture (node -p process.arch):
  • node-sass version (node -p "require('node-sass').info"): 4.5.3
  • npm node-sass versions (npm ls node-sass): 4.5.3
$ nvm install node
Downloading and installing node v8.0.0...
Downloading https://nodejs.org/dist/v8.0.0/node-v8.0.0-linux-x64.tar.xz...
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v8.0.0 (npm v5.0.0)

During install the following message shows up:

/node_modules/node-sass/lib/binding.js:15
      throw new Error(errors.missingBinary());
      ^
Error: Missing binding 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 (node_modules/node-sass/lib/binding.js:15:13)
    at Object.<anonymous> (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 Object.<anonymous> (dist/lib/steps/assets.js:4:12)

I guess that bindings for Node 8 are not yet available.

Invalid - By Design

Most helpful comment

Hi,
Did you try to make a
yarn add node-sass
in order to update it? Because I use it with Gulp and I had to do this so that it works with nodejs 8.

All 14 comments

Hi,
Did you try to make a
yarn add node-sass
in order to update it? Because I use it with Gulp and I had to do this so that it works with nodejs 8.

You need to reinstall your node modules when you change node versions.

On 2 Jun. 2017 7:11 pm, "Benoit" notifications@github.com wrote:

Hi,
Did you try to make a
yarn add node-sass
in order to update it? Because I use it with Gulp and I had to do this so
that it works with nodejs 8.

—
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/1998#issuecomment-305733791,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjZWJajoQUFhnC0m9c4J4vFQyqCHWOWks5r_9HbgaJpZM4Nt73L
.

To reinstall isn't enough, @xzyfer . I already tried that. npm install, yarn install, to remove node_modules...

Make sure you're install [email protected] and that you don't have
dependencies on older node-sass. You can use npm ls node-sass to confirm
all node-sass dependencies, and their parents.

On 7 Jun. 2017 12:47 am, "Robson Sobral" notifications@github.com wrote:

To reinstall isn't enough, @xzyfer https://github.com/xzyfer . I
already tried that. npm install, yarn install, to remove node_modules...

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

To update gulp-sass from 2 to 3 made it. Thank you, @xzyfer . And, please, forgive me for have bothered you. Thank you!

It crashed again. Trying to find out what happened. Thanks!

it doesn't work with any solutions of google answer,
I think the issue is coming from people who use nvm and yarn and both are gonna be idiot status, the node-sass don't know who is he, what node version is.

I've removed whole the node_modules, rubuilt several times switch lots of version to remove node-sass and re-install again, it do NOT work.

Make sure you have the latest node-sass version. You can see your version
with npm ls node-sass

On Fri., 23 Mar. 2018, 7:54 pm Monochrome Yeh, notifications@github.com
wrote:

I've removed whole the node_modules, rubuilt several times switch lots of
version to remove node-sass and re-install again, it do NOT work.

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

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

Found bindings for the following environments:
  - OS X 64-bit with Node.js 6.x

I've removed all the time, even though I'm certainly in node.js 6, the node-sass always try to find binding on Node.js 8.
Also I've removed node-sass when I switched to node.js 8.

I did:

  • remove node-sass on node.js 6
  • remove node-sass on node.js 8
  • rebuild node-sass
  • npm cache clean
  • reinstall node-sass on node.js 6

okay, I did nvm uninstall 8 and then execute my project, it still show

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

Found bindings for the following environments:
  - OS X 64-bit with Node.js 6.x

how come...

conclusion is that node-sass gonna build correctly, but finding incorrectly

It appears you're somehow installing or rebuilding with Node 6, but trying to execute with Node 8. This is a local envorinment issue, and nothing to do with node-sass.

There isn't anything we can do. You need to figure out how your Node versions are changing. If you're running node-sass in special environment like electron, or an IDE it may have it's own version of Node bundled.

@xzyfer , ya, you are right, electron is alway peer @types/[email protected], even though I installed electron on node.js 6.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexandrubau picture alexandrubau  Â·  3Comments

NathanKleekamp picture NathanKleekamp  Â·  4Comments

harukaeru picture harukaeru  Â·  3Comments

amarbham picture amarbham  Â·  3Comments

Pixelatex picture Pixelatex  Â·  3Comments