Wrong prebuilt binary target for native dependency
See original GitHub issue-
Node: 13.2.0
-
Version: 22.7.0
-
Electron Version: 9.0.5
-
Electron Type (current, beta, nightly): current
-
Target: win/nsis
-
serialport: 9.0.0
I’ve been unable to successfully integrate the serialport npm module into my build. Here is my build configuration and script in my package.json:
"scripts": {
"start": "electron .",
"build": "npm-run-all --parallel build:main build:renderer",
"build:main": "webpack --config ./webpack.config.main.js --mode production",
"build:renderer": "webpack --config ./webpack.config.renderer.js --mode production",
"pack": "npm run-script build && electron-builder --dir",
"dist": "npm run-script build && electron-builder"
},
"build": {
"appId": "my_app",
"files": [
"build/**/*",
"node_modules/**/*"
]
}
the result of my “dist” script:
• build native dependency from sources name=@serialport/bindings
version=9.0.0
platform=win32
arch=x64
reason=prebuild-install failed with error (run with env DEBUG=electron-builder to get more information)
error=prebuild-install info begin Prebuild-install version 5.3.4
prebuild-install WARN install prebuilt binaries enforced with --force!
prebuild-install WARN install prebuilt binaries may be out of date!
prebuild-install info looking for cached prebuild @ C:\Users\Me\AppData\Roaming\npm-cache\_prebuilds\90024b-bindings-v9.0.0-electron-v80-win32-x64.tar.gz
prebuild-install http request GET https://github.com/serialport/node-serialport/releases/download/@serialport/bindings@9.0.0/bindings-v9.0.0-electron-v80-win32-x64.tar.gz
prebuild-install http 404 https://github.com/serialport/node-serialport/releases/download/@serialport/bindings@9.0.0/bindings-v9.0.0-electron-v80-win32-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=9.0.5 runtime=electron arch=x64 libc= platform=win32)
Now it seems to me that the target would be the v83 build since that corresponds to the chrome version used in electron’s 9.0.5 release and there is a v83 release of the serialport prebuilt binary in their releases, there is no v80 release. I do not know how electron-builder knows which release version to target or if this is a configuration issue with the serialport module. Should I be using an earlier version of electron/serialport? I have yet to try and put a re-named binary into that cache location.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top GitHub Comments
I had similar issue with old
serialport
dependency, so here is my setup which works:This issue still exists in electron-builder 22.9.1