Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The libsass binding was not found, current node version 4.0.0 #162

Closed
epitaphmike opened this issue Sep 23, 2015 · 28 comments
Closed

The libsass binding was not found, current node version 4.0.0 #162

epitaphmike opened this issue Sep 23, 2015 · 28 comments

Comments

@epitaphmike
Copy link

I am getting this error when using sass-loader. Current installed version of node is v4.0.0

I attempted to uninstall and reinstall node-sass with no avail.

Error: The libsass binding was not found in ../node_modules/node-sass/vendor/darwin-x64-11/binding.node
(STDERR) This usually happens because your node version has changed.
(STDERR) Run npm rebuild node-sass to build the binding for your current node version.
(STDERR) at Object.sass.getBinaryPath (../node_modules/node-sass/lib/extensions.js:150:11)

@jorrit
Copy link
Contributor

jorrit commented Sep 24, 2015

What's the output when you rebuild node-sass? Does it help when you remove your node_modules folder and run a fresh npm install?

@epitaphmike
Copy link
Author

Output after running npm rebuild node-sass

node-sass@3.3.3 install ../node_modules/node-sass
node scripts/install.js

node-sass@3.3.3 postinstall ../node_modules/node-sass
node scripts/build.js

../node_modules/node-sass/vendor/darwin-x64-46/binding.node exists. testing binary.
Binary is fine; exiting.
node-sass@3.3.3 ../node_modules/node-sass

Wiping the node_modules folder and running npm install yields the same results unfortunately.

@jorrit
Copy link
Contributor

jorrit commented Sep 24, 2015

The path is different: darwin-x64-46 vs darwin-x64-11. Is anything in your code configuring this explicitly? Try searching for BINARY_PATH or binaryPath in your source code to find any instance.
The 11 or 46 is the value of process.versions.modules. This could also be a mismatch when you build node-sass with a different node version than you're running sass-loader with. You should check that too. It seems you're running it with a lower version than the one you're building it with.

@epitaphmike
Copy link
Author

There is nothing explicitly pointing to darwin-x64-11, I blew out any global node_sass instances. I also loaded in manually the darwin-x64-11/binding.node just to test and started getting other errors related to LazyResult.async.

ERROR in /meteor-webpack-react-kickstart//css-loader!/meteor-webpack-react-kickstart//sass-loader!/meteor-webpack-react-kickstart/react/todo/sass/Main.scss
? Module build failed: ReferenceError: Promise is not defined
? at LazyResult.async (/meteor-webpack-react-kickstart/node_modules/css-loader/node_modules/postcss/lib/lazy-result.js:152:31)

I added this package to meteor-webpack-react-kickstart if that helps. I also posted an issue on their repo to test against the actual environment in which I am using webpack.

I appreciate the help. Thank you.

@jorrit
Copy link
Contributor

jorrit commented Sep 24, 2015

Are you absolutely sure that your program runs on node 4.0.0 and not some other version using nvm?

@epitaphmike
Copy link
Author

Everything runs fine before I install sass-loader.

@jorrit
Copy link
Contributor

jorrit commented Sep 25, 2015

That could be because you didn't use any modules that must be compiled before sass-loader/node-sass.

@sikanhe
Copy link

sikanhe commented Sep 27, 2015

getting exactly same error here

@xx0r
Copy link

xx0r commented Sep 29, 2015

+1

@epitaphmike
Copy link
Author

There is a cross thread going here as well. Seems it is a mac issue. I do not own a PC to confirm.

@xx0r
Copy link

xx0r commented Oct 2, 2015

Just posted on the other thread. Can confirm this on PC win 8.1. Gonna try the win 10

@xx0r
Copy link

xx0r commented Oct 2, 2015

same for win 10

Error: The libsass binding was not found in .....\src\EmptyWebApplication\node_modules\gulp-sass\node_modules\node-sass\vendor\win32-ia32-11\binding.node
This usually happens because your node version has changed.
Run npm rebuild node-sass to build the binding for your current node version.
at Object.sass.getBinaryPath (.....\src\EmptyWebApplication\node_modules\gulp-sass\node_modules\node-sass\lib\extensions.js:150:11)
at Object. (.....\src\EmptyWebApplication\node_modules\gulp-sass\node_modules\node-sass\lib\index.js:16:36)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (.....\src\EmptyWebApplication\node_modules\gulp-sass\index.js:163:21)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)

@sapox
Copy link

sapox commented Oct 5, 2015

Same situation on Ubuntu 14.04. :-/

@jhnns
Copy link
Member

jhnns commented Oct 5, 2015

I'm using node 4.1 on OSX and could not observe these kind of errors. Could you provide a minimal test setup that reproduces the error? Otherwise I doubt that this repository is the right location for this issue.

@xx0r
Copy link

xx0r commented Oct 8, 2015

I have checked out a clean version of the solution which lead to automated restore of the NPM packages to the latest version. Now the issue is happening no more... However, I tried to restore the packages before and it did not help.

@radotzki
Copy link

Quick fix: delete the node-sass folder from node_modules and run NPM install.
(OSX node version 4.1.2)

@natarajanmca11
Copy link

Thanks @radotzki
Its working fine now. (Windows Node version 4.2.1 )

@jhnns
Copy link
Member

jhnns commented Oct 25, 2015

Closing this for now because there is no example and it's probably not the right repository.

@jhnns jhnns closed this as completed Oct 25, 2015
@haydenhancock
Copy link

Not sure if this should be closed as I am experiencing this same issue on Windows 10 and node 4.2.2.

When I removed the node-sass folder from node_modules folder and ran npm install nothing happened. I had to run npm install gulp-sass --save-dev again in order for the node-sass folder to be reinstalled. Unfortunately, this still doesn't resolve the error as the win32-ia32-11 still doesn't exist. Mine only shows win32-x64-46.

@jhnns
Copy link
Member

jhnns commented Nov 4, 2015

Do you have node-sass as dependency of your project? Since npm@3, peerDependencies won't be installed automatically anymore.

@haydenhancock
Copy link

In my devDependencies, I have:

  "devDependencies": {
    "gulp": "^3.9.0",
    "gulp-sass": "^2.1.0",
    "node-sass": "^3.4.1"
  }

@haydenhancock
Copy link

I resolved by issue with Visual Studio by moving the PATH variable higher in priority as found here.

@jhnns
Copy link
Member

jhnns commented Nov 5, 2015

Thx for sharing this!

@dontbesorry80
Copy link

Haydenhancock.
I have the same problem as this. But moving the PATH variable higher didn't solve the issue. However, I think my PATH variable seems very short... What's supposed to be be in there which helps?

@haydenhancock
Copy link

@dontbesorry80,

When you updated the path variable, did you sign out and back in? If not, try that. I'll send a screenshot of my setup when I can.

@dontbesorry80
Copy link

Never mind I got it sorted. I needed to add C:\Users\robert\AppData\Roaming\npm to my Path. Once that had been added and moved up in the list of Visual Studio priorities it has now been sorted.

@haydenhancock
Copy link

Awesome, Glad to hear!

@lusse
Copy link

lusse commented Aug 23, 2016

@haydenhancock this solved my issue. Thanx a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests