electron-builder: !include: could not open file: build failed in github action with app-builder-lib
- Electron-Builder Version: 24.13.3 | 25.0.0-alpha.6
- Node Version: 20
- Electron Version: 30.0.0
- Electron Type (current, beta, nightly): current
- Target: none
Error output:
!include: could not open file: "...\node_modules\.pnpm\app-builder-lib@25.0.0-alpha.6_dmg-builder@25.0.0-alpha.6_electron-builder-squirrel-windows@2_jamshtybgehbmy77zbhfnvoaye\node_modules\app-builder-lib\templates\nsis\include\StdUtils.nsh"
Error in script "<stdin>" on line 1 -- aborting creation process
failedTask=build stackTrace=Error: C:\Users\runneradmin\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\Bin\makensis.exe process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 8
- Comments: 19
Commits related to this issue
- downgrade electron-builder https://github.com/electron-userland/electron-builder/issues/8175 — committed to Legcord/Legcord by smartfrigde 3 years ago
- chore: pin electron builder. https://github.com/electron-userland/electron-builder/issues/8175 Signed-off-by: Innei <i@innei.in> — committed to RSSNext/Folo by Innei 2 years ago
- refactor: setting atoms and support disable scroll to mark read (#108) * refactor: setting atoms Signed-off-by: Innei <i@innei.in> * fix: export Signed-off-by: Innei <i@innei.in> * feat: ... — committed to RSSNext/Folo by Innei 2 years ago
Downgrading to 24.13.0 seems to work for us. 24.13.1 is the first version to not work in our case.
Seems to be related to long file paths in Windows. If the working directory is moved closer to root it works with 24.13.3 (shorten the file paths). This is particularly relevant for Windows CI, as runners tend to force a long initial file path before the repo directory, and then absolute paths from there become very long.
We are also using pnpm, so this is potentially an interaction with the tree structure pnpm uses for node_modules.
Same issue:
I’m getting this with
24.13.1on Windows but24.13.0works fine. Usingpnpmand Electron v29. I wonder if this is caused by https://github.com/electron-userland/electron-builder/pull/8052…EDIT: We’re experiencing timeouts of our
electron-builderE2Es on Windows when using Electron 30, which may be related. Sticking to Electron 29 andelectron-builder@24.13.0for now.