Closed probably-not closed 1 year ago
It looks like this is related to an issue around here: https://github.com/electron/node-abi/blob/main/scripts/update-abi-registry.js#L69
The electron version 25.1.1 is in the electron version response, but for some reason an alpha version is what is in the versionsByModules
value at the end.
This seems to be caused by an issue in the sorting for the electron versions. The new sort functions introduced in #139 sorted the electron versions in a descending order, so when the reduce function runs, it ends up reducing the electron version to the earliest released version per major+modules version combination.
Following conversation in the PR, the sorting is likely correct and #139 hasn't shipped yet so there's no issue there, but there still seems to be some sort of issue (not sure what it is yet, seems to happen when trying to upgrade electron and electron-forge?)...
Adding the relevant details from the PR here:
package.json
contains the latest versions of forge and electron:
"devDependencies": {
"@electron-forge/cli": "^6.2.1",
"@electron-forge/maker-appx": "^6.2.1",
"@electron-forge/maker-deb": "^6.2.1",
"@electron-forge/maker-pkg": "^6.2.1",
"@electron-forge/maker-rpm": "^6.2.1",
"@electron-forge/maker-squirrel": "^6.2.1",
"@electron-forge/maker-zip": "^6.2.1",
"@electron-forge/plugin-webpack": "^6.2.1",
"@electron-forge/publisher-s3": "^6.2.1",
"@electron/rebuild": "^3.2.13",
"electron": "25.1.1",
"node-abi": "^3.45.0"
}
We are continuously seeing the "could not detect abi" error while running any sort of rebuild.
We are trying to upgrade to the latest electron and forge versions and this is just blocking the upgrade for some reason.
@probably-not You shouldn't be adding a top level dependency for node-abit
, that doesn't help (it actually just obscures the issue). You need to ensure that the transitive node-abit
dependency is updated.
Either via npm npm update node-abi --depth=100
or yarn npx uuaw@latest node-abi
@MarshallOfSound If this is the case, I believe the issue here is the error message... It says to update node-abi, but doesn't say that it can't be a top level dependency and that the update needs to update the transitive dependency without adding a top level dependency.
Can I open a PR to fix this error message so that it's clear how to solve the issue?
When upgrading to electron 25.1.1: