Electron Node Module Version
michaelheap.com·5d
Preview
Report Post

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...