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

Compiling Error different Node.js version #211

Closed
k1ngrnbz opened this issue Dec 17, 2018 · 4 comments
Closed

Compiling Error different Node.js version #211

k1ngrnbz opened this issue Dec 17, 2018 · 4 comments

Comments

@k1ngrnbz
Copy link

Hey Guys,
i've installed Ubuntu 18.04 on my notebook and installed the newest LTS Version of Nodejs.
When i'm trying to run my electron app i am getting this error:

better_sqlite3.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing

Does anyone know how to fix it? Do i have to downgrade my nodejs version?

@JoshuaWise
Copy link
Member

JoshuaWise commented Dec 17, 2018

rm -rf node_modules
npm install

You need to reinstall it after switching to a new Nodejs version.

@k1ngrnbz
Copy link
Author

rm -rf node_modules
npm install

You need to reinstall it after switching to a new Nodejs version.

I've downgraded nodejs to 8.10.0 and npm to 3.5.2. The problem is that better-sqlite3 and electron 3.10 Version don't work together. Electron Version 2.0.6 works fine for me. With which Version of electron did you test your modul?

@JoshuaWise
Copy link
Member

JoshuaWise commented Dec 18, 2018

Ahhh, for Electron, you'll need to use electron-rebuild. In fact there's a dedicated Electron Help Thread.

@k1ngrnbz
Copy link
Author

Ahhh, for Electron, you'll need to use electron-rebuild. In fact there's a dedicated Electron Help Thread.

Thanks!
I've installed electron-rebuild
node_modules/.bin/electron-rebuild -f -w better-sqlite3
After this it worked!

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

No branches or pull requests

2 participants