Skip to content
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

Cannot find module '@resvg/resvg-js-darwin-arm64' when compiling universal app #6919

Closed
andirsun opened this issue Jun 3, 2022 · 4 comments

Comments

@andirsun
Copy link

andirsun commented Jun 3, 2022

  • Electron-Builder Version:
    last
  • Node Version:
    16
  • Electron Version:
  • 17.4
  • Electron Type (current, beta, nightly):
  • Target:
    mac os universal

I am using resvg library that offers binaries for all OSes including m1 arm64, the problem is that electron builder is not detecting the library when I am compiling the app for universal architecture and only include the library x64 version in the ASAR, the result when I test the app on m1 mac is that library is missing.

> streamline@4.0.17 pack:mac
> electron-builder --mac

  • electron-builder  version=23.0.9 os=21.5.0
  • loaded configuration  file=/Users/julianacaromoreno/projects/streamline-web/electron-builder.yml
  • writing effective config  file=dist/builder-effective-config.yaml
  • packaging       platform=darwin arch=arm64 electron=17.4.6 appOutDir=dist/mac-arm64
  • signing         file=dist/mac-arm64/Streamline.app identityName=Developer ID Application: Webalys, LLC (U7XNJG59LL) identityHash=D67BA83C59353EA2BB7501103EB25119DCBDF921 provisioningProfile=none
  • building        target=macOS zip arch=arm64 file=dist/Streamline.zip
  • building        target=DMG arch=arm64 file=dist/Streamline.dmg
  • building block map  blockMapFile=dist/Streamline.zip.blockmap

How can I force electron builder to download the arm64 binary of the library ?

  • This is the content of the unpacked resources

Captura de Pantalla 2022-06-03 a la(s) 5 25 24 p m

photo4958589268956130044

@burgil
Copy link

burgil commented Jun 5, 2022

Hey, Try the solution I just posted on another similar issue: #6928 (comment)

@andirsun
Copy link
Author

Same result @burgil

@hrueger
Copy link
Contributor

hrueger commented Sep 26, 2022

see thx/resvg-js#153

@andirsun
Copy link
Author

andirsun commented Oct 6, 2023

Fixed with this, the solution is to exclude C/C++ Files from the asar pack
In my case:

  ...
  "files": [
    "!node_modules/**/*.{mk,a,o,h}"
  ],
  ...

@andirsun andirsun closed this as completed Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants