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

Latest version crash my build pipeline #323

Closed
mymymy1303 opened this issue Sep 10, 2024 · 2 comments · Fixed by #325
Closed

Latest version crash my build pipeline #323

mymymy1303 opened this issue Sep 10, 2024 · 2 comments · Fixed by #325
Assignees
Labels

Comments

@mymymy1303
Copy link

Hi asar development team,

The latest version crash my build pipeline, below is the error message:

An unhandled rejection has occurred inside Forge:
TypeError: Cannot read properties of undefined (reading 'createPackageWithOptions')
at MacApp.asarApp (/Users/omnibusx/source/omnibusx_build_scripts/source/omnibusx_app/node_modules/@electron/packager/src/platform.ts:248:16)
at async MacApp.buildApp (/Users/omnibusx/source/omnibusx_build_scripts/source/omnibusx_app/node_modules/@electron/packager/src/platform.ts:153:5)
at async MacApp.initialize (/Users/omnibusx/source/omnibusx_build_scripts/source/omnibusx_app/node_modules/@electron/packager/src/platform.ts:144:7)
at async MacApp.create (/Users/omnibusx/source/omnibusx_build_scripts/source/omnibusx_app/node_modules/@electron/packager/src/mac.ts:435:5)
at async Promise.all (index 0)
at async packager (/Users/omnibusx/source/omnibusx_build_scripts/source/omnibusx_app/node_modules/@electron/packager/src/packager.ts:246:20)

@felixrieseberg felixrieseberg self-assigned this Sep 10, 2024
@felixrieseberg
Copy link
Member

Confirmed. The likely cause is that we export __esModule: true but do not export a default.

> require("@electron/asar")
{
  createPackage: [AsyncFunction: createPackage],
  createPackageWithOptions: [AsyncFunction: createPackageWithOptions],
  createPackageFromFiles: [AsyncFunction: createPackageFromFiles],
  statFile: [Function: statFile],
  getRawHeader: [Function: getRawHeader],
  listPackage: [Function: listPackage],
  extractFile: [Function: extractFile],
  extractAll: [Function: extractAll],
  uncache: [Function: uncache],
  uncacheAll: [Function: uncacheAll]
}
> require("@electron/asar").__esModule
true
> require("@electron/asar").default
undefined

Copy link

🎉 This issue has been resolved in version 3.2.12 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants