Closed maximborisov closed 3 years ago
Any news on this issue?
I am dealing with this in my own project right now. However, I think the problem is with electron-rebuild
using an older version of node-abi
. The problem goes away when I use yarn's selective dependency resolution feature to force electron-rebuild
to use the latest node-abi
:
{
"name": "my-electron-app",
...
"dependencies": {
...
"node-abi": "^2.26.0",
},
"devDependencies": {
...
"electron": "12.0.5"
},
"resolutions": {
"node-abi": "^2.26.0"
}
}
I am dealing with this in my own project right now. However, I think the problem is with
electron-rebuild
using an older version ofnode-abi
. The problem goes away when I use yarn's selective dependency resolution feature to forceelectron-rebuild
to use the latestnode-abi
:package.json
{ "name": "my-electron-app", ... "dependencies": { ... "node-abi": "^2.26.0", }, "devDependencies": { ... "electron": "12.0.5" }, "resolutions": { "node-abi": "^2.26.0" } }
Very helpful, thanks!
I am dealing with this in my own project right now. However, I think the problem is with
electron-rebuild
using an older version ofnode-abi
. The problem goes away when I use yarn's selective dependency resolution feature to forceelectron-rebuild
to use the latestnode-abi
:package.json
{ "name": "my-electron-app", ... "dependencies": { ... "node-abi": "^2.26.0", }, "devDependencies": { ... "electron": "12.0.5" }, "resolutions": { "node-abi": "^2.26.0" } }
Thanks a bunch!
Note for npm users. Instead of resolutions
, use overrides
.
You don't need to use resolutions to fix this, you just need to update the node-abi dependency using npm/yarn the standard ways.
E.g. npm has npm update node-abi --depth=100
and for yarn you can use npx uuaw node-abi
Hello. We faced one problem after upgrade ours Electron app from version 11 to 12:
$ electron-rebuild --parallel --force --types prod,dev,optional --module-dir app × Rebuild Failed
An unhandled error occurred inside electron-rebuild Could not detect abi for version 12.0.0 and runtime electron. Updating "node-abi" might help solve this issue if it is a new release of electron
Error: Could not detect abi for version 12.0.0 and runtime electron. Updating "node-abi" might help solve this issue if it is a new release of electron at Object.getAbi (D:\Users\max\Documents\work\post\PartPriem\offline_lk\node_modules\node-abi\index.js:30:9) at Rebuilder.get ABI [as ABI] (D:\Users\max\Documents\work\post\PartPriem\offline_lk\node_modules\electron-rebuild\lib\src\rebuild.js:111:39) at ModuleRebuilder.prebuildNativeModuleExists (D:\Users\max\Documents\work\post\PartPriem\offline_lk\node_modules\electron-rebuild\lib\src\module-rebuilder.js:129:146) at Rebuilder.rebuildModuleAt (D:\Users\max\Documents\work\post\PartPriem\offline_lk\node_modules\electron-rebuild\lib\src\rebuild.js:170:35) at async Promise.all (index 126) at async Rebuilder.rebuild (D:\Users\max\Documents\work\post\PartPriem\offline_lk\node_modules\electron-rebuild\lib\src\rebuild.js:148:13) at async D:\Users\max\Documents\work\post\PartPriem\offline_lk\node_modules\electron-rebuild\lib\src\cli.js:146:9 error Command failed with exit code 4294967295.
This error can be fixed when manually change abi_registry.json and replace target from "12.0.0-nightly.20201013" to "12.0.0"
We use Node-abi version 2.19.3. Upgrading to versions 2.20.0 and 2.21.0 has no effect