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 MacOS Universal Build not working #153
Comments
Could you maybe publish a package which includes both binaries for darwin for universal builds? |
In fact, each platform is a separate package, which we distribute through optionalDependencies. I'm not sure why optionalDependencies is not working in electron, but you can install the binary packages for the Mac platform separately.
All npm packages: |
Hi @yisibl, Dependencies using node-gyp are handled correctly and rebuild using some emulator mode for arm64. A |
@hrueger I believe you are talking about the cross-compiling scenario. There is no universal binary concept for Node.js addons because Node.js addon is dynamic libraries, not executable binary. What package manager are you using? See npm/rfcs#519 (comment) for how to install dependencies for cross-compiling. |
I know. It is called a |
Ah, thanks, I somehow couldn't find this. I'm using yarn. This will probably fix the issue, I'll test it and then close this issue. |
@hrueger It looks like you can work around it with yarn or pnpm. Thanks to @Brooooooklyn's expert advice. |
@hrueger Is your problem solved? |
Hm, more or less... But I also agree with you that publishing another package which is almost a duplicate of another packages does not make a lot sense... For now, I'll just keep my fork up to date. |
Hi @yisibl,
first of all, thanks for this excellent library, it is working really well. I just have the following problem:
I have an Electron app which uses
resvg-js
. For MacOS it is packaged usingelectron-builder
. The configuration creates a universal build, which means, that the application is packaged for x86 and for arm64 (M1) and then bundled into a single.dmg
file. This is done using a GitHub Action runningmacos-latest
.The problem now is, that when I try to start the App on a M1 Mac, I get the following error:
As you can see, the binary for
darwin
arm64
is missing.It also does not help to add that package to the
dependencies
manually, because it is not being installed on the build system (the arch in thepackage.json
does not match).Can I somehow "force" this package to be installed / included?
The text was updated successfully, but these errors were encountered: