-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
Electron with [email protected] v5-compat fails as no native build was found #384
Comments
Have the same problem here. |
It seems that it is because the prebuilt binaries are not properly installed when compiled in an electron context. I use Electron 9.0.3 on Ubuntu 20.04 with zeromq 6.0.0-beta6 with typescript and webpack. |
Thanks for the feedback. I'd love to get this resolved because ZeroMQ is popular with Electron-based apps. However I'm not familiar with Electron at all. So I'm looking for:
|
I don't know node/electron well enough to help you on the first point, sorry... yarn create electron-app zeromqtest --template=typescript-webpack Inside the src/main.ts, just add at the top of the file and then you should have the problem: Error: No native build was found for platform=linux arch=x64 runtime=electron abi=80 uv=1 libc=glibc You can fix it with the symbolic link workaround. |
I may have a fix. I added the following to the file webpack.main.config.js: And now, it packages correctly, there is no need for the link any more. |
@Bzerk-Seven : Does it also works for you with a bundled/packaged application (with electron-packager / electron-builder / ...)? Did you expose zeromq as webpack external? Any other thing? |
I did not do anything more config than adding the 3 lines. I am not very familiar with webpack and even node/electron, so I don't know what is a webpack external. |
@Bzerk-Seven thanks for your solution, it helps me on macos 10.15.7, zeromq 6.0.0-beta.6, node 12.18.4, electron 6.1.12 |
@Letrab It took me days, but I got a workaround. If you're still having an issue with the packaged app using the electron-forge webpack template, I had to mark zerorpc (depends on zeromq) in webpack.config.externals. In webpack.main.config.js:
And in forge.config.js, I had added a function to run
Depending on the node-version you're using, you might want to install |
@raychengy Thanks for the tip. In the meanwhile I switched to electron-webpack, which has been great for me. Takes care of (most of) webpack config and handles electron-rebuild dependencies very well! So if anything I can recommend to anyone, use |
This does not work for me. If I try to set the |
Using I don't use forge so I didn't have to set anything else. Starting from Electron 12 (Node 14), I need to run "electron-rebuild" though after install, not sure why: https://github.com/electron/electron-rebuild At the moment I'll stay with Electron 11 and Node 12 |
I am encountering similar issue on macOS 12.3.1 M1
|
Hello to everyone! Indeed, I totally agree, @raychengy solution was perfect. However, in my particular case, it was necessary to also include |
I have the same problem with the electron 28 with the "@electron-forge/cli" using "vite".
An error occurs when you simply add a line using zmq, like this: I can't use Webpack trick because no Webpack, I use "vite". |
Describe the bug
When using [email protected] v5-compat it does not work with electron but gives the error of:
The electron window launches, however this is output in the development console and the app just shows a white window.
I have tried to do the following to solve it, without luck:
../node-gyp/bin/node-gyp.js rebuild --target=6.0.0 --arch=x64 --dist-url=https://electronjs.org/headers
This is observed in my vue-electron project based on: https://github.com/nklayman/vue-cli-plugin-electron-builder
This error happens for both for development and building.
If I downgrade to zeromq v.5.1.1 as another issue suggested then the project correctly rebuilds and I can use it without any errors. However as the server uses zeromq v6.0.0 it appears that I cannot establish a connection with v.5.1.1.
I thought it might be an issue with the precompiled for the 6.0.0 versions, as v5.1.1 works? However I couldn't figure out how to see what node version the precompiled for v6.0.0 were compiled against.
I have another vue-electron project based on: https://github.com/SimulatedGREG/electron-vue where the development works with v6.0.0-beta.6, however as soon as I build and run the appimage it errors with the same error:
Reproducing
My versions
The text was updated successfully, but these errors were encountered: