-
-
Notifications
You must be signed in to change notification settings - Fork 997
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
Prebuild-install paths are hard to use / lack documentation for multi-platform use #1898
Comments
explaining the problem made me look at options to change the version prefix it turns out there is an option in
This results in a successful install of the binding for electron-mac-x64 build on a windows machine
Note that there is still a path mismatch , but apparently this is resolved somehow so I won't worry about that anymore. Still , given the time I have spend to figure this out, I think this calls for some additional documentation. If there is another or a simpler solution to package serialport in a single multi-platform module, while still using the prebuilts, please let me know. Note2: |
Had the same problem when I upgraded serialport in my project. |
So, how do I solve it? When I run |
@JuanM04, I do not see how this is related to the issue I raised, and your description is quite sparse. So I cannot help you. |
Nevermind, I solved it. I just commented here because hours of trying to fix it brought me here. What happened is that electron-builder uses prebuild-install when building an Electron app. There is somewhere an issue related to this, and I'm also going to post my solution there. I just created a "scripts": {
"postinstall": "echo \"tag-prefix=@serialport/bindings@\" > ./node_modules/@serialport/bindings/.prebuild-installrc && electron-builder install-app-deps"
} |
I have create a script to download bindings for multiple versions & platforms and store them in a simple file structure, so they can be used to load the module dynamically. https://github.com/Josverl/pymakr-vsc/blob/fix/SerialMultiPlatform/scripts/mp-download.ps1 its in powershell as i find that simpler to write / debug , but I think it can be transposed to just any other scripting language |
It should be noted that it appears that a number of the published builds are actually incorrect |
@Josverl I am using macOS, but I've the same issue. Unfortunately, I do not completely understand, what you've done. Thanks |
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 |
Summary of Problem
(Please answer all 3)
What are you trying to do?
In trying to use prebuild-install to retrieve the bindings for multiple electron versions & platforms
C:\develop\<project>\node_modules\@serialport\bindings>.\node_modules\.bin\prebuild-install.cmd --runtime electron --target 4.2.5 --arch x64 --platform win32 --verbose
What happens?
prebuild-install is not able to find
the same happens also when using the default platform, version & architecture
this makes it very hard and troublesome to build and distribute multi-platform packages
also due to quite sparse documentation it is hard to find out why thinks are not working.
The prebuilds should be found , downloaded, and subsequently installed
it would be even better to have documentation on how to install / download for multiple platforms ( i.e. prepackage for 3 platforms for electron 4.2.5.
Code to Reproduce the Issue
see above ..
possible cause
Comparing the URLs used by prebuild-install and the URLs currently used there appreatrs to be 2 mismatches :
I notice that in the path there are in 2 place in the path that are incorrect
Versions, Operating System and Hardware
The text was updated successfully, but these errors were encountered: