Skip to content

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

@RangerMauve

Description

@RangerMauve

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    need/triageNeeds initial labeling and prioritization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions