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 use with electron-builder when asar: false #56

Open
RangerMauve opened this issue Jan 25, 2023 · 1 comment
Open

Cannot use with electron-builder when asar: false #56

RangerMauve opened this issue Jan 25, 2023 · 1 comment
Labels
need/triage Needs initial labeling and prioritization

Comments

@RangerMauve
Copy link

I'm trying to use this module for the Agregore Browser with the latest version of Electron and I'm trying to use ESM.

Although Electron doesn't support ESM natively, it's possible to use it if one disables ASAR support and imports files from the filesystem.

However, for some reason electron-builder has been getting me the following error when I try to build a binary without ASAR (on Liunux). You can find more detailed build logs here: https://github.com/AgregoreWeb/agregore-browser/actions/runs/4009313691/jobs/6884515962#step:5:99

 • asar usage is disabled — this is strongly not recommended  solution=enable asar and use asarUnpack to unpack files that must be externally available
  ⨯ ENOENT: no such file or directory, symlink '/home/mauve/programming/agregore-browser/node_modules/go-ipfs/go-ipfs/ipfs' -> '/home/mauve/programming/agregore-browser/release/linux-unpacked/resources/app/node_modules/go-ipfs/bin/ipfs'  failedTask=build stackTrace=Error: ENOENT: no such file or directory, symlink '/home/mauve/programming/agregore-browser/node_modules/go-ipfs/go-ipfs/ipfs' -> '/home/mauve/programming/agregore-browser/release/linux-unpacked/resources/app/node_modules/go-ipfs/bin/ipfs'
    at processImmediate (node:internal/timers:471:21)
From previous event:
    at Object.copyAppFiles (/home/mauve/programming/agregore-browser/node_modules/app-builder-lib/src/util/appFileCopier.ts:85:27)

Sometimes not using ASAR is important to making apps work and this is currently prevent that option from being pursued.

Are there any thoughts on what can be done about this or what I can do to debug the issue further?

I'll post any fixes I find here as I go.

@RangerMauve RangerMauve added the need/triage Needs initial labeling and prioritization label Jan 25, 2023
@RangerMauve
Copy link
Author

I ended up having asar:true but extracting pretty much all the files at runtime to get it to work. 🙃

electron/electron#21457 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

1 participant