node-sass: Error: Missing binding

OS X 10.11.4 Atom 1.7.3 Node v6.0.0 source-preview v0.5.0

I’m getting the following error with my Atom package source-preview-sass:

Error: Missing binding /Users/Dan/Library/Application Support/Atom/dev/packages/source-preview-sass/node_modules/node-sass/vendor/darwin-x64-47/binding.node Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 5.x Found bindings for the following environments:

  • OS X 64-bit with Node.js 6.x This usually happens because your environment has changed since running npm install. Run npm rebuild node-sass to build the binding for your current environment.

I was hoping that updating my node-sass dependency to ^3.7.0 would fix this but it didn’t 😞

Possibly related to #1504 and #1515?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 15 (5 by maintainers)

Most upvoted comments

Correct atom shell is not supported. However this warning is about a missing binary. I don’t know how this error could be any more clear.

Problem

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

Hint

Found bindings for the following environments:

  • OS X 64-bit with Node.js 6.x

Explanation

You previously install node-sass using Node.js. You’re now on Node.js 5.

This usually happens because your environment has changed since running npm install.

Steps to solve problem

Run npm rebuild node-sass to build the binding for your current environment.

I open a discussion with the plugin authors

I am the plugin author… 😄

npm rebuild node-sass didn’t work for me either, but removing the node_modules directory entirely and then calling npm istall fixed it.

I had the same problem and npm rebuild node-sass didn’t entirely fix it.

I had to terminals open to the same directory. I did ran nvm use v4.5.0, nvm install and npm rebuild node-sass in one terminal. I forgot to run nvm use v4.5.0 in the other window so it was running a different version of node with packages for the wrong version.

Stupid mistake and I wasted 30 mins trying to fix it. Hope this helps someone.

Solution

Reload your terminal or run nvm use v{some version} to use the correct version.