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

NODE_MODULE_VERSION error #23

Closed
setoelkahfi opened this issue Dec 18, 2017 · 3 comments
Closed

NODE_MODULE_VERSION error #23

setoelkahfi opened this issue Dec 18, 2017 · 3 comments

Comments

@setoelkahfi
Copy link

When ./run, I get this:

ERROR error:  Error: The module '/Users/john/postbird/node_modules/libpq/build/Release/addon.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 59. This version of Node.js requires
NODE_MODULE_VERSION 54. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or`npm install`).
INFO Error: The module '/Users/john/postbird/node_modules/libpq/build/Release/addon.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 59. This version of Node.js requires
NODE_MODULE_VERSION 54. 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 bindings (/Users/john/postbird/node_modules/bindings/bindings.js:76:44)
    at Object.<anonymous> (/Users/john/postbird/node_modules/libpq/index.js:1:201)

I removed libpq folder and do npm rebuild and npm install but not solved the problem.

What's the possible workaround for this?
I guess it has something to do with node version. I'm not sure.

node v9.3.0
npm 5.6.0

@Paxa
Copy link
Owner

Paxa commented Dec 18, 2017

Try:

PATH=$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin ./node_modules/.bin/electron-rebuild -n 54

or rake rebuild_ext

Sorry for confusion, native extensions should be compiled for electron version

@setoelkahfi
Copy link
Author

OK, solved.
I'm exploring now.

@Paxa
Copy link
Owner

Paxa commented Jan 16, 2018

Thank you, pushed better documentation 9a709c0

@Paxa Paxa closed this as completed Jan 16, 2018
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

2 participants