electron-builder: builds broken since v26.0.4
Affects Windows & macOS at least. Linux seems unaffected https://github.com/element-hq/element-desktop/actions/runs/13135755860/job/36653217694?pr=624
Seems related to https://github.com/electron-userland/electron-builder/pull/8571
Run yarn build:universal --publish never
yarn run v1.22.22
$ yarn run build:ts && yarn run build:res && electron-builder --universal --publish never
$ tsc
$ tsx scripts/copy-res.ts
• electron-builder version=26.0.4 os=23.6.0
• loaded configuration file=/Users/runner/work/element-desktop/element-desktop/electron-builder.ts
• executing @electron/rebuild electronVersion=34.0.1 arch=x64 buildFromSource=false appDir=./
• installing native dependencies arch=x64
• completed installing native dependencies
• packaging platform=darwin arch=x64 electron=34.0.1 appOutDir=dist/mac-universal-x64-temp
• downloading url=https://github.com/electron/electron/releases/download/v34.0.1/electron-v34.0.1-darwin-x64.zip size=105 MB parts=6
• downloaded url=https://github.com/electron/electron/releases/download/v34.0.1/electron-v34.0.1-darwin-x64.zip duration=2.323s
⨯ The "path" argument must be of type string. Received undefined failedTask=build stackTrace=TypeError: The "path" argument must be of type string. Received undefined
at Object.normalize (node:path:[12](https://github.com/element-hq/element-desktop/actions/runs/13135755860/job/36650705352?pr=624#step:13:13)05:5)
at flatten (/Users/runner/work/element-desktop/element-desktop/node_modules/app-builder-lib/src/node-module-collector/nodeModulesCollector.ts:63:49)
at flatten (/Users/runner/work/element-desktop/element-desktop/node_modules/app-builder-lib/src/node-module-collector/nodeModulesCollector.ts:68:9)
at YarnNodeModulesCollector.convertToDependencyGraph (/Users/runner/work/element-desktop/element-desktop/node_modules/app-builder-lib/src/node-module-collector/nodeModulesCollector.ts:72:5)
at YarnNodeModulesCollector.getNodeModules (/Users/runner/work/element-desktop/element-desktop/node_modules/app-builder-lib/src/node-module-collector/nodeModulesCollector.ts:[13](https://github.com/element-hq/element-desktop/actions/runs/13135755860/job/36650705352?pr=624#step:13:14)0:34)
at computeNodeModuleFileSets (/Users/runner/work/element-desktop/element-desktop/node_modules/app-builder-lib/src/util/appFileCopier.ts:181:[16](https://github.com/element-hq/element-desktop/actions/runs/13135755860/job/36650705352?pr=624#step:13:17))
at /Users/runner/work/element-desktop/element-desktop/node_modules/app-builder-lib/src/platformPackager.ts:509:34
at async Promise.all (index 0)
at AsyncTaskManager.awaitTasks (/Users/runner/work/element-desktop/element-desktop/node_modules/builder-util/src/asyncTaskManager.ts:65:25)
at MacPackager.doPack (/Users/runner/work/element-desktop/element-desktop/node_modules/app-builder-lib/src/platformPackager.ts:324:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Process completed with exit code 1.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 22 (7 by maintainers)
Thanks. I have successfully reproduced your issue on Windows and got it running. The issue has been fixed in this https://github.com/electron-userland/electron-builder/pull/8845, and I’ve tested it without any problems.
@mmaietta v26.0.6 looks to fix things, thanks for the ping and thanks for the fix @beyondkmp
https://github.com/element-hq/element-desktop/actions/runs/13189975230?pr=2113
Yeah that’s fine, just means you didn’t include an element web in the element desktop build. That’s done via yarn run fetch, more details in the readme. If it gets that far then it should be fine though
@t3chguy @mmaietta
I resolved the issue with the missing
mspackage(https://github.com/electron-userland/electron-builder/pull/8851), but after runningelement, it still throws an error, which doesn’t seem to be related to the package itself.@mmaietta thanks for the ping, I have given it a go at https://github.com/element-hq/element-desktop/pull/2113
Unfortunately it now seems successful but results in a broken package.
msis a transitive dev of Sentry, something like@sentry/electron -> @sentry/node -> @opentelemetry/instrumentation -> require-in-the-middle -> debug -> msSo 26.0.3 will have the app-builder & squirrel changes you want prob.
26.0.4 was solely a release with a migration of GOlang app-builder-bin’s node_modules collection logic to a JS-based solution (allowing us to more aptly control the logic, support additional package managers, and remove the workaround needed for pnpm hoisting)
We added quite a few additional tests, as well as copied the entire test suite for yarn berry’s
hoist.tslogic (we could have installed the yarn package to leverage the logic, but holy moly that would increase our dependency tree/chain to unnecessarily huge)