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

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

Closed
barbalex opened this issue Nov 16, 2021 · 2 comments

Comments

@barbalex
Copy link

barbalex commented Nov 16, 2021

After updating an electron app to electron version 16.0.0, when running electron-forge start I get this error:

PS C:\Users\alexa\awel-personal> yarn dev
✔ Checking your system
✔ Locating Application
✖ Preparing native dependencies: 0 / 1

An unhandled error has occurred inside Forge:
Could not detect abi for version 16.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 16.0.0 and runtime electron.  Updating "node-abi" might help solve this issue if it is a new release of electron
    at Object.getAbi (C:\Users\alexa\awel-personal\node_modules\node-abi\index.js:36:9)
    at Rebuilder.get ABI [as ABI] (C:\Users\alexa\awel-personal\node_modules\electron-rebuild\src\rebuild.ts:127:33)
    at ModuleRebuilder.get metaData [as metaData] (C:\Users\alexa\awel-personal\node_modules\electron-rebuild\src\module-rebuilder.ts:34:54)
    at ModuleRebuilder.alreadyBuiltByRebuild (C:\Users\alexa\awel-personal\node_modules\electron-rebuild\src\module-rebuilder.ts:40:28)
    at Rebuilder.rebuildModuleAt (C:\Users\alexa\awel-personal\node_modules\electron-rebuild\src\rebuild.ts:264:24)
    at Rebuilder.rebuild (C:\Users\alexa\awel-personal\node_modules\electron-rebuild\src\rebuild.ts:200:9)
    at C:\Users\alexa\awel-personal\node_modules\@electron-forge\core\src\util\rebuild.ts:32:5
@MarshallOfSound
Copy link
Member

You need to keep the transitive dependency on node-abi up to date, luckily because you're using yarn this is quite easy.

npx uuaw node-abi

😄

@barbalex
Copy link
Author

I tried three things:

  1. installing node_abi (as electron seems to expect it?). Did not work, got error about abi
  2. also installing abi. Still got errors
  3. npx uuaw node-abi. Which produced this error:
PS C:\Users\alexa\awel-personal> npx uuaw node-abi
Need to install the following packages:
  uuaw
Ok to proceed? (y) y
C:\Users\alexa\AppData\Local\npm-cache\_npx\02cd06b8297c5953\node_modules\@yarnpkg\lockfile\index.js:5064
    throw new SyntaxError(`${msg} ${this.token.line}:${this.token.col} in ${this.fileLoc}`);
    ^

SyntaxError: Unknown token: { line: 4, col: 2, type: 'INVALID', value: undefined } 4:2 in lockfile
    at Parser.unexpected (C:\Users\alexa\AppData\Local\npm-cache\_npx\02cd06b8297c5953\node_modules\@yarnpkg\lockfile\index.js:5064:11)
    at Parser.parse (C:\Users\alexa\AppData\Local\npm-cache\_npx\02cd06b8297c5953\node_modules\@yarnpkg\lockfile\index.js:5193:14)
    at parse (C:\Users\alexa\AppData\Local\npm-cache\_npx\02cd06b8297c5953\node_modules\@yarnpkg\lockfile\index.js:5262:17)
    at Object.module.exports.exports.default (C:\Users\alexa\AppData\Local\npm-cache\_npx\02cd06b8297c5953\node_modules\@yarnpkg\lockfile\index.js:4835:96)
    at Object.<anonymous> (C:\Users\alexa\AppData\Local\npm-cache\_npx\02cd06b8297c5953\node_modules\uuaw\src\index.js:16:21)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)

I am not quite sure how to go on. Maybe I would have to force using node_abi after installing it? (I forget how it is called but yarn has or used to have a way to do that).

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

2 participants