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

No ABI version for Electron 12 release #102

Closed
maximborisov opened this issue Mar 18, 2021 · 5 comments
Closed

No ABI version for Electron 12 release #102

maximborisov opened this issue Mar 18, 2021 · 5 comments

Comments

@maximborisov
Copy link

maximborisov commented Mar 18, 2021

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

@maximborisov
Copy link
Author

Any news on this issue?

@jacobq
Copy link
Contributor

jacobq commented May 3, 2021

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:

package.json

{
  "name": "my-electron-app",
   ...
  "dependencies": {
    ...
    "node-abi": "^2.26.0",
  },
  "devDependencies": {
    ...
    "electron": "12.0.5"
  },
  "resolutions": {
    "node-abi": "^2.26.0"
  }
}

@maximborisov
Copy link
Author

maximborisov commented May 12, 2021

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:

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!

@harmonikas996
Copy link

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:

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.

@MarshallOfSound
Copy link
Member

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

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

4 participants