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

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

Closed
tom2strobl opened this issue Oct 5, 2021 · 8 comments

Comments

@tom2strobl
Copy link

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.

@kryops
Copy link

kryops commented Oct 5, 2021

We stumbled on this when trying to upgrade to Electron 15.

Looks like it should already be fixed in master via #861, but not released yet - the latest release 3.2.3 still depends on node-abi@^2.19.2.

Would you consider publishing a new release that includes this fix? Thanks a lot! 🙂

@tessro
Copy link

tessro commented Oct 5, 2021

@kryops unfortunately #861 only impacts type definitions. To fix this, the actual node-abi package needs to be updated.

@tessro
Copy link

tessro commented Oct 5, 2021

Correction: This appears to have happened already, here: #876. Just waiting on a release! 🤞🏼

@kryops
Copy link

kryops commented Oct 5, 2021

My bad, I believe the actual fix happened in #848

@jjeff
Copy link

jjeff commented Nov 4, 2021

Nudge. Are there plans for a new release?

@b3ni
Copy link

b3ni commented Nov 5, 2021

Im wating to new release.

@malept
Copy link
Member

malept commented Nov 9, 2021

@malept malept closed this as completed Nov 9, 2021
@BlackGlory
Copy link

v3.2.5 still throwing the same error.

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

No branches or pull requests

7 participants