electron/rebuild

Could not detect abi for version 20.1.0 and runtime electron

rortan134 opened this issue ยท 13 comments

Got this error while rebuilding

Error: Could not detect abi for version 20.1.0 and runtime electron.  Updating "node-abi" might help solve this issue if it is a new release of electron

Failed at:

C:\Program Files\nodejs\node.exe process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
An unhandled error occurred inside electron-rebuild
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c npm run electron-rebuild && npm run link-modules

Same issue

I run npm install node-abi@3.24.0 to force node-abi version to latest , and then build succeed

Aaqu commented

same problem

Aaqu commented

same problem

I found the solution, uninstall and again install electron-rebuild
in my project, it works!

Adding the following to package.json fixed my issue.
"overrides": { "electron-rebuild": { "node-abi": "3.24.0" } },

Installing the Lib saved my day :)

โจฏ Could not detect abi for version 25.0.1 and runtime electron.
โจฏ Could not detect abi for version 25.1.0 and runtime electron.

@Krivega Same problem for me

same here

edit: electron >23 fails, 22 ok

Setting the resolution override in package.json fixed this issue for me with electron 26.1.0 and electron-forge 6.4.1:

"resolutions": {
    "node-abi": "^3.47.0"
  },

I resolved this issue by adding "overrides" in package.json,
make sure there is not older node-abi are defined in package-lock.json.
Finally, added following overrides to resolve all Error: Could not detect abi for version 26.4.0 and runtime electron

"overrides": {
"prebuild-install": {
"node-abi": "3.51.0"
},
"prebuild": {
"node-abi": "3.51.0"
},
"robotjs": {
"node-abi": "3.51.0"
}
},

update node-abi work for me
yarn upgrade node-abi
or
npm update node-abi

i thinks needs document what version of node-abi is compatible with what version of node