Skip to content

Conversation

@valeriangalliat
Copy link

PR #124 introduced a regression where the following path:

Contents/Resources/app.asar.unpacked/node_modules/fsevents/fsevents.node

Would get identified as AppFileType.MACHO instead of AppFileType.APP_CODE as it was previously

We need to make sure that path containing .asar.unpacked/ are also treated as APP_CODE

Otherwise, universal native Node modules like fsevents.node get passed to this check that results in the following error:

Error: Detected file "Contents/Resources/app.asar.unpacked/node_modules/fsevents/fsevents.node" that's the same in both x64 and arm64 builds and not covered by the x64ArchFiles rule

PR electron#124 introduced a regression where the following path:

    Contents/Resources/app.asar.unpacked/node_modules/fsevents/fsevents.node

Would get identified as `AppFileType.MACHO` instead of
`AppFileType.APP_CODE` as it was previously

We need to make sure that path containing `.asar.unpacked/` are also
treated as `APP_CODE`
if (p.endsWith('.asar')) {
// Need to match both e.g. `Contents/Resources/app.asar` and
// `Contents/Resources/app.asar.unpacked/node_modules/fsevents/fsevents.node`
if (p.endsWith('.asar') || p.includes('.asar.unpacked/')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a comment on your original comment
#124 (comment)

Happy to continue the discussion here though!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice yeah it seems that #126 will fix that issue 👍

@mmaietta
Copy link
Contributor

mmaietta commented May 2, 2025

electron/universal fix has been merged and released under v2.0.3

You should be able to override the subdependency in your package.json until electron/universal is updated in electron/forge or electron-builder

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

Successfully merging this pull request may close these issues.

2 participants