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 module build/Release/keytar.node was compiled against a different Node.js version #64

Closed
alexcroox opened this Issue May 4, 2017 · 14 comments

Comments

Projects
None yet
9 participants
@alexcroox

alexcroox commented May 4, 2017

I'm using with Electron, install install runs fine but when importing it with node I get:

The module '.../node_modules/keytar/build/Release/keytar.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 51. This version of Node.js requires
NODE_MODULE_VERSION 53. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or`npm install`).

I tried npm rebuild keytar with no joy

@jgknott

This comment has been minimized.

Show comment
Hide comment
@jgknott

jgknott May 14, 2017

Having the same issue.

jgknott commented May 14, 2017

Having the same issue.

@shiftkey

This comment has been minimized.

Show comment
Hide comment
@shiftkey

shiftkey May 14, 2017

Contributor

@alexcroox @jgknott does an npm rebuild fix the issue? If not, more information about your setup and steps to reproduce this is necessary...

Contributor

shiftkey commented May 14, 2017

@alexcroox @jgknott does an npm rebuild fix the issue? If not, more information about your setup and steps to reproduce this is necessary...

@jgknott

This comment has been minimized.

Show comment
Hide comment
@jgknott

jgknott May 15, 2017

npm rebuild didn't work for me.

Here's the error I'm getting:

keytar.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 48. This version of Node.js requires
NODE_MODULE_VERSION 51. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or`npm install`).
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20)
    at Object.Module._extensions..node (module.js:598:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at /Users/jknott/Dropbox (Personal)/dev/ottter/desktop/node_modules/keytar/lib/keytar.js:1:161
    at Object.<anonymous> (/project/node_modules/keytar/lib/keytar.js:55:2)

I'm on node 6.10 and npm 4.2.0

jgknott commented May 15, 2017

npm rebuild didn't work for me.

Here's the error I'm getting:

keytar.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 48. This version of Node.js requires
NODE_MODULE_VERSION 51. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or`npm install`).
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20)
    at Object.Module._extensions..node (module.js:598:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at /Users/jknott/Dropbox (Personal)/dev/ottter/desktop/node_modules/keytar/lib/keytar.js:1:161
    at Object.<anonymous> (/project/node_modules/keytar/lib/keytar.js:55:2)

I'm on node 6.10 and npm 4.2.0

@shiftkey

This comment has been minimized.

Show comment
Hide comment
@shiftkey

shiftkey May 15, 2017

Contributor

I'm on node 6.10 and npm 4.2.0

These seem recent enough. Any thoughts @BinaryMuse on why they might still be seeing this error?

Contributor

shiftkey commented May 15, 2017

I'm on node 6.10 and npm 4.2.0

These seem recent enough. Any thoughts @BinaryMuse on why they might still be seeing this error?

@BinaryMuse

This comment has been minimized.

Show comment
Hide comment
@BinaryMuse

BinaryMuse May 15, 2017

Member

Unless I'm mistaken, npm rebuild will just rebuild the module against Node's version, not Electron's. You'll need to use one of the methods in the Using Native Node Modules documentation.

Member

BinaryMuse commented May 15, 2017

Unless I'm mistaken, npm rebuild will just rebuild the module against Node's version, not Electron's. You'll need to use one of the methods in the Using Native Node Modules documentation.

@alexcroox

This comment has been minimized.

Show comment
Hide comment
@alexcroox

alexcroox May 16, 2017

I'm running node 7.6.0 and npm 4.1.2

alexcroox commented May 16, 2017

I'm running node 7.6.0 and npm 4.1.2

@jgknott

This comment has been minimized.

Show comment
Hide comment
@jgknott

jgknott May 16, 2017

@BinaryMuse that solved it! Thank you!
Steps for mac:
npm install --save-dev electron-rebuild
./node_modules/.bin/electron-rebuild
I got some errors, on some packages but the keytar worked fine and now i'm able to run the app.

jgknott commented May 16, 2017

@BinaryMuse that solved it! Thank you!
Steps for mac:
npm install --save-dev electron-rebuild
./node_modules/.bin/electron-rebuild
I got some errors, on some packages but the keytar worked fine and now i'm able to run the app.

@shiftkey shiftkey closed this May 16, 2017

@alexcroox

This comment has been minimized.

Show comment
Hide comment
@alexcroox

alexcroox May 17, 2017

Does this mean the dev environment needs to be setup on each target OS and the module rebuilt on each? Or does a rebuild once on Mac cover all OS's?

alexcroox commented May 17, 2017

Does this mean the dev environment needs to be setup on each target OS and the module rebuilt on each? Or does a rebuild once on Mac cover all OS's?

@shiftkey

This comment has been minimized.

Show comment
Hide comment
@shiftkey

shiftkey May 17, 2017

Contributor

Does this mean the dev environment needs to be setup on each target OS and the module rebuilt on each?

@alexcroox yes, because the native toolchain is OS-dependent

Contributor

shiftkey commented May 17, 2017

Does this mean the dev environment needs to be setup on each target OS and the module rebuilt on each?

@alexcroox yes, because the native toolchain is OS-dependent

@liowmei

This comment has been minimized.

Show comment
Hide comment
@liowmei

liowmei Sep 22, 2017

Hi, i am new in using the firmware and i encounter the problem as below :
The module '\?\C:\Users\user.atom\packages\Pymakr\precompiles\serialport-win\build\Release\serialport.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 49. This version of Node.js requires
NODE_MODULE_VERSION 53. Please try re-compiling or re-installing
the module (for instance, using npm rebuild ornpm install).

May i know how can i fix it? Thanks

liowmei commented Sep 22, 2017

Hi, i am new in using the firmware and i encounter the problem as below :
The module '\?\C:\Users\user.atom\packages\Pymakr\precompiles\serialport-win\build\Release\serialport.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 49. This version of Node.js requires
NODE_MODULE_VERSION 53. Please try re-compiling or re-installing
the module (for instance, using npm rebuild ornpm install).

May i know how can i fix it? Thanks

@CorentinGC

This comment has been minimized.

Show comment
Hide comment
@CorentinGC

CorentinGC Oct 5, 2017

@liowmei Read the comment of @BinaryMuse and @jgknott ;)
I am using serialport too, and this worked like a charm !

CorentinGC commented Oct 5, 2017

@liowmei Read the comment of @BinaryMuse and @jgknott ;)
I am using serialport too, and this worked like a charm !

@Arthaclarius

This comment has been minimized.

Show comment
Hide comment
@Arthaclarius

Arthaclarius Dec 13, 2017

delete node_module and run npm i

Arthaclarius commented Dec 13, 2017

delete node_module and run npm i

@massi67

This comment has been minimized.

Show comment
Hide comment
@massi67

massi67 Jan 2, 2018

Can somebody send steps to resolve issue in Windows?

massi67 commented Jan 2, 2018

Can somebody send steps to resolve issue in Windows?

@Riz-waan

This comment has been minimized.

Show comment
Hide comment
@Riz-waan

Riz-waan Jul 23, 2018

@massi67 did you try what @Arthaclarius said?

Riz-waan commented Jul 23, 2018

@massi67 did you try what @Arthaclarius said?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment