-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Node sass could not find a binding: detecting wrong node version / ABI #2460
Comments
Looks like you've got multiple versoy of node in your path. Because
node-gyp spawns nkde in a child process the versions seem to be switching.
You can confirm this by changing your console.log to process.versions.node
…On Sat., 21 Jul. 2018, 10:03 am Andre Bautista, ***@***.***> wrote:
- NPM version (npm -v): 5.6.0
- Node version (node -v): v8.11.3
- Node Process (node -p process.versions):
{ http_parser: '2.8.0',
node: '8.11.3',
v8: '6.2.414.54',
uv: '1.19.1',
zlib: '1.2.11',
ares: '1.10.1-DEV',
modules: '57',
nghttp2: '1.32.0',
napi: '3',
openssl: '1.0.2o',
icu: '60.1',
unicode: '10.0',
cldr: '32.0',
tz: '2017c' }
- Node Platform (node -p process.platform): darwin
- Node architecture (node -p process.arch): x64
- node-sass version (node -p "require('node-sass').info"):
node-sass 4.9.2 (Wrapper) [JavaScript]
libsass 3.5.4 (Sass Compiler) [C/C++]
- npm node-sass versions (npm ls node-sass):
***@***.*** /Users/AndreBautista/client_work/*****/preact-test
└── ***@***.***
I'm running into an issue trying to debug my webpack configuration with
the node-nightly <https://github.com/hemanth/node-nightly> package. This
is not the same issue that can be debugged via npm rebuild node-sass I've
tried that command and several other things regarding the binaries. I've
determined it comes down to node versioning.
My stack trace looks like this:
ERROR in ./app/style/index.scss (./node_modules/css-loader??ref--5-1!./node_modules/postcss-loader/lib??ref--5-2!./node_modules/sass-loader/lib/loader.js!./app/style/index.scss)
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Error: Missing binding /Users/andre/client_work/*****/preact-test/node_modules/node-sass/vendor/darwin-x64-64/binding.node
Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 10.x
Found bindings for the following environments:
- OS X 64-bit with Node.js 8.x
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to download the binding for your current environment.
at module.exports (/Users/andre/client_work/*****/preact-test/node_modules/node-sass/lib/binding.js:15:13)
at Object.<anonymous> (/Users/andre/client_work/*****/preact-test/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (/Users/andre/client_work/*****/preact-test/node_modules/v8-compile-cache/v8-compile-cache.js:178:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (/Users/andre/client_work/*****/preact-test/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at Object.sassLoader (/Users/andre/client_work/*****/preact-test/node_modules/sass-loader/lib/loader.js:24:22)
I dug into node-sass/lib/extensions.js to try and see where the error
message about Node.js 10.x being used when I have node 8.x installed and
when I put a log inside getHumanNodeVersion(abi) to console.log(abi) it
alternated and returned:
undefined
64
57
undefined
64
...
That's as far as I could dig since I'm not exactly sure where ABI is being
set but according to node 57 is my version and 64 is the 10.x which may be
running on my computer somewhere but not that I'm aware of.
Not sure if something else in my build is calling that version of node
somehow?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2460>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjZWC3EMN-L-zkepZPjpPr4mm5R8j9nks5uIm_KgaJpZM4VZZ8g>
.
|
@xzyfer when I add a
|
That's super weird. It shouldn't be possible so I'm inclined to think it's
an issue in the nightly
…On Sat., 21 Jul. 2018, 12:16 pm Andre Bautista, ***@***.***> wrote:
@xzyfer <https://github.com/xzyfer> when I add a
console.log(process.versions.node) after the existing console.log the
output is
undefined
11.0.0-nightly20180719373aae1f86
64
11.0.0-nightly20180719373aae1f86
57
11.0.0-nightly20180719373aae1f86
undefined
...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2460 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjZWKC74G-tZEpmPLoLMuqDxsznXxuhks5uIo8AgaJpZM4VZZ8g>
.
|
I believe so, when I did a
I'll try asking the nightly people why the name of node is changed. Is there another field that could be used to set the node version here? |
No. It has to be module because that is what represents the version of V8s
ABI it's compiled against.
…On Sat., 21 Jul. 2018, 12:33 pm Andre Bautista, ***@***.***> wrote:
I believe so, when I did a console.log(process.versions) to get more
details it returned
{ http_parser: '2.8.0',
node: '11.0.0-nightly20180719373aae1f86',
v8: '6.7.288.49-node.15',
uv: '1.22.0',
zlib: '1.2.11',
ares: '1.14.0',
modules: '64',
nghttp2: '1.32.0',
napi: '3',
openssl: '1.1.0h',
icu: '62.1',
unicode: '11.0',
cldr: '33.1',
tz: '2018e' }
I'll try asking the nightly people why the name of node is changed. Is
there another field that could be used to set the node version here?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2460 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjZWB7qNGXFEgaVikwbMyCtFkmmSoyDks5uIpMDgaJpZM4VZZ8g>
.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
It's not random. The error only happens if you've changed your version of Node i.e. with nvm. When you install node-sass it's couple to a specific major version of Node. If you change versions you need to run npm update node-sass. This is true for all native addons because npm says so.
This means you've changed to a version of Node that too new for your version of node-sass. Native addons can only support the versions of Node that were available at the time the native addon was published. Check the release notes for the version of node-sass you're running ( |
@xzyfer Maybe you are not understanding.
During this time webpack was never stopped. If you are saying the executing version of node changed while running and in memory... I think this is a pretty unreasonable thing to state. |
I'm simply stating the only circumstance under which node-sass can do what
you're saying it's doing.
It's possible you are changing node versions, it's possible you've got
multiple node-sass versions installed. Many weird environmental things are
possible.
What's not possible is what's you're describing without either the Node or
node-sass version changing.
…On Wed., 25 Jul. 2018, 1:48 pm Benjamin Baldivia, ***@***.***> wrote:
@xzyfer <https://github.com/xzyfer> Maybe you are not understanding. 1. I
start a process which runs webpack.
2. It compiles everything successfully.
3. I make a change to a file.
3a. In some cases, this works and there is no error.
3b. In other cases, I start seeing the "Unsupported environment" error in
browser console.
4. After changing a file again sometimes it starts compiling successfully
again.
During this time webpack was never stopped. If you are saying the
executing version of node changed while running and in memory... I think
this is a pretty unreasonable thing to state.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2460 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjZWGIGcVxPuLZAK4rju5pXr7If1c0Sks5uJ-qDgaJpZM4VZZ8g>
.
|
I don't understand if there's a solution/workaround or explanation. I have the same message with node-sass 4.12.0 And I have tried rebuilding it from scratch (--force) and it replies always the same... perhaps is an issue with nvm. I haven't change the version, but in any case, I can't compile it for the current version... it just doesn't work... |
Doesn't work. :S |
I had to stop using |
----- It is inappropriate to include political and offensive content in public code repositories. Public code repositories should be neutral spaces for collaboration and community, free from personal or political views that could alienate or discriminate against others. Political content, especially that which targets or disparages minority groups, can be harmful and divisive. It can make people feel unwelcome and unsafe, and it can create a hostile work environment. Please refrain from adding such content to public code repositories.
npm -v
): 5.6.0node -v
): v8.11.3node -p process.versions
):{ http_parser: '2.8.0',
node: '8.11.3',
v8: '6.2.414.54',
uv: '1.19.1',
zlib: '1.2.11',
ares: '1.10.1-DEV',
modules: '57',
nghttp2: '1.32.0',
napi: '3',
openssl: '1.0.2o',
icu: '60.1',
unicode: '10.0',
cldr: '32.0',
tz: '2017c' }
node -p process.platform
): darwinnode -p process.arch
): x64node -p "require('node-sass').info"
):node-sass 4.9.2 (Wrapper) [JavaScript]
libsass 3.5.4 (Sass Compiler) [C/C++]
npm ls node-sass
):preact-test@0.0.0 /Users/AndreBautista/client_work/*****/preact-test
└── node-sass@4.9.2
I'm running into an issue trying to debug my webpack configuration with the node-nightly package. This is not the same issue that can be debugged via
npm rebuild node-sass
I've tried that command and several other things regarding the binaries. I've determined it comes down to node versioning.My stack trace looks like this:
I dug into
node-sass/lib/extensions.js
to try and see where the error message aboutNode.js 10.x
being used when I have node 8.x installed and when I put a log insidegetHumanNodeVersion(abi)
toconsole.log(abi)
it alternated and returned:That's as far as I could dig since I'm not exactly sure where ABI is being set but according to node 57 is my version and 64 is the 10.x which may be running on my computer somewhere but not that I'm aware of.
Not sure if something else in my build is calling that version of node somehow?
The text was updated successfully, but these errors were encountered: