Closed iamcam closed 4 years ago
Looking at the URLs that are requested, prebuild-install seems to be looking for a release called v8.0.4
, however the release in this repo with the artifacts is called @serialport/bindings@8.0.4
.
I'm not sure if this is something that can be easily fixed on the side of the serialport team, however I used the following manual workaround:
curl -L "https://github.com/serialport/node-serialport/releases/download/%40serialport%2Fbindings%408.0.4/$FILENAME" -o "$PATH_TO_CACHED"
This is still happening. Anybody know what the issue is?
However electron-builder
{
"scripts": {
"install": "prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild",
}
}
I just landed #2003 (thanks @s00d!) which gives electron-builder a way to pickup the tag prefix by default, unknown why it's not being passed through on windows, I'd open an issue with them.
I published @serialport/bindings@8.0.6
the binaries are building now, please try it out!
it still get 404 when I building Windows app on Mac using electron-builder.
it still get 404 when I building Windows app on Mac using electron-builder.
Best way it use a docker container electronuserland/builder:wine for build windows and Linux multi-platform-build
it still get 404 when I building Windows app on Mac using electron-builder.
Best way it use a docker container electronuserland/builder:wine for build windows and Linux multi-platform-build
I am testing electronuserland/builder:wine for building win64 application ,still get this error.
electron-builder version=22.2.0 os=4.9.184-linuxkit
• loaded configuration file=package.json ("build" field)
• electron-rebuild not required if you use electron-builder, please consider to remove excess dependency from devDependencies
To ensure your native dependencies are always matched electron version, simply add script `"postinstall": "electron-builder install-app-deps" to your `package.json`
• writing effective config file=build/builder-effective-config.yaml
• executing node-gyp rebuild arch=x64
• rebuilding native dependencies dependencies=@serialport/bindings@8.0.6 platform=win32 arch=x64
• install prebuilt binary name=@serialport/bindings version=8.0.6 platform=win32 arch=x64
⨯ cannot build native dependency reason=prebuild-install failed with error and build from sources not possible because platform or arch not compatible
cause=exit status 1
errorOut=prebuild-install info begin Prebuild-install version 5.3.3
prebuild-install info looking for cached prebuild @ /root/.npm/_prebuilds/64b73e-bindings-v8.0.6-electron-v75-win32-x64.tar.gz
prebuild-install http request GET https://github.com/serialport/node-serialport/releases/download/v8.0.6/bindings-v8.0.6-electron-v75-win32-x64.tar.gz
prebuild-install http 404 https://github.com/serialport/node-serialport/releases/download/v8.0.6/bindings-v8.0.6-electron-v75-win32-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=7.1.7 runtime=electron arch=x64 libc= platform=win32)
command=/usr/local/bin/node /project/node_modules/prebuild-install/bin.js --platform=win32 --arch=x64 --target=7.1.7 --runtime=electron --verbose --force
workingDir=/project/node_modules/@serialport/bindings
⨯ /project/node_modules/app-builder-lib/node_modules/app-builder-bin/linux/x64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE stackTrace=
Error: /project/node_modules/app-builder-lib/node_modules/app-builder-bin/linux/x64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
at ChildProcess.childProcess.once.code (/project/node_modules/app-builder-lib/node_modules/builder-util/src/util.ts:239:14)
at Object.onceWrapper (events.js:285:13)
at ChildProcess.emit (events.js:197:13)
at maybeClose (internal/child_process.js:984:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
error Command failed with exit code 1.
I am testing electronuserland/builder:wine for building win64 application ,still get this error.
Sorry its my mistake, I used the format of the old version. I make new Pull request 2008
You can try to do so before installing and building:
echo \\{ \\\"tag-prefix\\\": \\\"@serialport/bindings@\\\" }\\ > ./node_modules/@serialport/bindings/.prebuild-installrc
Where can I find the docs on that?
I confirmed that the fix in #2008 resolved this issue, but there is no released version that is included this fix. I hope it will be released soon.
Any reason why there has not been release for this?
No reason but my day job keeping me busy.
Successfully published:
let me know how it works
Hi, I run into the same issue because version 8 of Electron uses NODE_MODULE_VERSION 76 and most recent serialport release is for version 75. Here's the output from electron-builder
prebuild-install http request GET https://github.com/serialport/node-serialport/releases/download/@serialport/bindings@8.0.7/bindings-v8.0.7-electron-v76-linux-x64.tar.gz
prebuild-install http 404 https://github.com/serialport/node-serialport/releases/download/@serialport/bindings@8.0.7/bindings-v8.0.7-electron-v76-linux-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=8.0.0 runtime=electron arch=x64 libc= platform=linux)
To make it work I downgraded my app to version 7.1.12 of electron but I made this post to informs core developers of the problem.
Hi, I run into the same issue because version 8 of Electron uses NODE_MODULE_VERSION 76 and most recent serialport release is for version 75. Here's the output from electron-builder
prebuild-install http request GET https://github.com/serialport/node-serialport/releases/download/@serialport/bindings@8.0.7/bindings-v8.0.7-electron-v76-linux-x64.tar.gz prebuild-install http 404 https://github.com/serialport/node-serialport/releases/download/@serialport/bindings@8.0.7/bindings-v8.0.7-electron-v76-linux-x64.tar.gz prebuild-install WARN install No prebuilt binaries found (target=8.0.0 runtime=electron arch=x64 libc= platform=linux)
To make it work I downgraded my app to version 7.1.12 of electron but I made this post to informs core developers of the problem.
This is the issue I reported few days ago https://github.com/serialport/node-serialport/issues/2031
Hi @reconbot, what's the approximate date when we can see the update for Electron 8?
What needs to be done to support it?
@reconbot As per https://github.com/serialport/node-serialport/issues/2031 we just need bindings for electron-v76
I set it back from version 8 to 7. I am using it now.
Per https://github.com/serialport/node-serialport/issues/2031#issuecomment-626324067 serialport@9
now ships with ABI v76 for electron
And just to note @mkurczewski getting it building probably took about 8 hours of work, the ecosystem is super brittle, I'm thankful for you raising the issues, but I want you to know what goes into it.
For anyone who finds this thread and wants to know how to build the binaries themselves. See https://github.com/serialport/node-serialport/issues/2031#issuecomment-616551473
Electron remains a pain to support but it's obviously a wonderful use case. If anyone wants to help make it easier to use with serialport, please consider updating the documents and contributing to https://github.com/serialport/website/blob/master/docs/guide-installation.md#electron
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week no further activity occurs. Feel free continue the discussion or ask for a never-stale
label to keep it open. If this is a support issue, consider sharing it on stack overflow to get more eyes on your problem.
When attempting to build electron with electron-build for windows via the docker image, there's an issue with getting a 404 when attempting to load the windows bindings from GitHub. The Mac version builds just fine, as does linux from the Docker image.
In Docker, If I manually download the bindings from the releases the copy the file name it missed (eg the has-prefixed filename) into _prebuilds folder, it builds fine. It appears to use the prebuilt binary on the Mac side as well.
Is there something missing in the prerebuild configuration where its looking for the wrong URL or something?
Any help would be greatly appreciated.