Electron Node Module Version
michaelheap.com·5w

I’ve been building an Electron app for the first time. It was all going well until I tried to use a dependency that involved native components. When I tried to run the app, I got an error that [...] was compiled against a different Node.js version:

bashError occurred in handler for 'tasks:fetch': Error: The module '/private/tmp/electron-demo/node_modules/better-sqlite3/build/Release/better_sqlite3.node'was compiled against a different Node.js version usingNODE_MODULE_VERSION 137. This version of Node.js requiresNODE_MODULE_VERSION 140. Please try re-compiling or re-installingthe module (for instance, using `npm rebuild` or `npm install`).

It turns out that the node.js and Electron ABIs are not compatible (see the [compatibility matrix](https://github.com/nodejs/node/blob/m…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help