electron/asar

Latest version crash my build pipeline

mymymy1303 opened this issue ยท 2 comments

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)

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

๐ŸŽ‰ This issue has been resolved in version 3.2.12 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€