question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Updating node-abi dependency to make electron-rebuild work with electron 15.x properly

See original GitHub issue

As of right now, electron-rebuild builds for a wrong node version for me

Error: The module 'app/node_modules/better-sqlite3/build/Release/better_sqlite3.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 89. This version of Node.js requires
NODE_MODULE_VERSION 98. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).

because https://github.com/electron/electron-rebuild/blob/master/src/rebuild.ts#L124 gets the abi number from node-abi 3.0.0, whereas 3.2.0 has support for electron 15.x

Workaround for me right now is to add

"resolutions": {  "**/node-abi": "^3.2.0" }

to the package.json, which is working and proves the case, but is dirty long-term.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
BlackGlorycommented, Nov 16, 2021

v3.2.5 still throwing the same error.

1reaction
paulrosaniacommented, Oct 5, 2021

Correction: This appears to have happened already, here: https://github.com/electron/electron-rebuild/pull/876. Just waiting on a release! 🤞🏼

Read more comments on GitHub >

github_iconTop Results From Across the Web

Updating node-abi dependency to make electron-rebuild work ...
Updating node-abi dependency to make electron-rebuild work with ... number from node-abi 3.0.0, whereas 3.2.0 has support for electron 15.x.
Read more >
How can I rebuild zeromq.js bindings for electron version 4.1.4?
I just ran into this today with Electron 6. npm rebuild zeromq doesn't help since it first downloads the binaries from their github, ......
Read more >
node-abi - npm
Get the Node ABI for a given target and runtime, and vice versa. ... Start using node-abi in your project by running `npm...
Read more >
Native Node Modules | Electron
When in doubt, run electron-rebuild first. Make sure the native module is compatible with the target platform and architecture for your Electron app....
Read more >
"npm run electronRebuild" failed on Joplin-2.6.10 - Development
Hi, I'm trying to build the Joplin-2.6.0 source code, but when i did the "npm run electronRebuild" cmd, it failed with the below...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found