Better-sqlite3: Compiling Error different Node.js version

Created on 17 Dec 2018  路  4Comments  路  Source: JoshuaWise/better-sqlite3

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?

help wanted

Most helpful comment

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!

All 4 comments

rm -rf node_modules
npm install

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

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?

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

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!

Was this page helpful?
1 / 5 - 1 ratings

Related issues

mann-david picture mann-david  路  5Comments

Alon-L picture Alon-L  路  5Comments

Babalon921 picture Babalon921  路  3Comments

spiffytech picture spiffytech  路  5Comments

johnelliott picture johnelliott  路  6Comments