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

!include: could not open file: build failed in github action with app-builder-lib #8175

Open
Soltus opened this issue Apr 16, 2024 · 9 comments

Comments

@Soltus
Copy link

Soltus commented Apr 16, 2024

  • 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
@Soltus
Copy link
Author

Soltus commented Apr 18, 2024

if i use "electron-builder": "24.9.1", LGTM

@drahmedshaheen
Copy link

downgrading to "electron-builder": "^23.6.0" worked for me

@88250
Copy link

88250 commented Apr 29, 2024

Same issue:

  • Electron 30.0.1
  • Electron Builder 24.13.3
  • Node 20.12.2
  • PNPM 9.0.2
⨯ C:\Users\runneradmin\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\Bin\makensis.exe process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code:
1
Output:
Command line defined: "APP_ID=org.b3log.siyuan"
Command line defined: "APP_GUID=c1e77cb7-68e1-5adb-ab[29](https://github.com/siyuan-note/siyuan/actions/runs/8876860253/job/24369309604#step:19:30)-ecf7379a9944"
Command line defined: "UNINSTALL_APP_KEY=c1e77cb7-68e1-5adb-ab29-ecf7379a9944"
Command line defined: "PRODUCT_NAME=SiYuan"
Command line defined: "PRODUCT_FILENAME=SiYuan"
Command line defined: "APP_FILENAME=SiYuan"
Command line defined: "APP_DESCRIPTION=Refactor your thinking"
Command line defined: "VERSION=3.0.11"
Command line defined: "PROJECT_DIR=D:\a\siyuan\siyuan\go\src\github.com\siyuan-note\siyuan\app"
Command line defined: "BUILD_RESOURCES_DIR=D:\a\siyuan\siyuan\go\src\github.com\siyuan-note\siyuan\app\build"
Command line defined: "APP_PACKAGE_NAME=SiYuan"
Command line defined: "MUI_ICON=D:\a\siyuan\siyuan\go\src\github.com\siyuan-note\siyuan\app\src\assets\icon.ico"
Command line defined: "MUI_UNICON=D:\a\siyuan\siyuan\go\src\github.com\siyuan-note\siyuan\app\src\assets\icon.ico"
Command line defined: "APP_64=D:\a\siyuan\siyuan\go\src\github.com\siyuan-note\siyuan\app\build\SiYuan-3.0.11-x64.nsis.7z"
Command line defined: "APP_64_NAME=SiYuan-3.0.11-x64.nsis.7z"
Command line defined: "APP_64_HASH=3D25DC1177228CB38DB6F6B7A6CA9EDD518574A3894C0E83285642644853E6835E16187458ACF6DC3B4AE55753B50C0D0C79BF788497E52D8F1F9B6A226F3A17"
Command line defined: "APP_64_UNPACKED_SIZE=400874"
Command line defined: "COMPANY_NAME=Yunnan Liandi Technology Co., Ltd."
Command line defined: "MUI_WELCOMEFINISHPAGE_BITMAP=D:\a\siyuan\siyuan\go\src\github.com\siyuan-note\siyuan\app\nsis\installerSidebar.bmp"
Command line defined: "MUI_UNWELCOMEFINISHPAGE_BITMAP=D:\a\siyuan\siyuan\go\src\github.com\siyuan-note\siyuan\app\nsis\uninstallerSidebar.bmp"
Command line defined: "ESTIMATED_SIZE=398610"
Command line defined: "COMPRESS=auto"
Command line defined: "BUILD_UNINSTALLER"
Command line defined: "UNINSTALLER_OUT_FILE=D:\a\siyuan\siyuan\go\src\github.com\siyuan-note\siyuan\app\build\__uninstaller-nsis-SiYuan.exe"
Processing config: C:\Users\runneradmin\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\nsisconf.nsh
Processing script file: "<stdin>" (UTF8)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Error output:
!include: could not open file: "D:\a\siyuan\siyuan\go\src\github.com\siyuan-note\siyuan\app\node_modules\.pnpm\app-builder-lib@24.13.3_dmg-builder@24.13.3_electron-builder-squirrel-windows@24.13.3_dmg-bui_lrspnoputfiosacwyigcypdbdi\node_modules\app-builder-lib\templates\nsis\include\StdUtils.nsh"
Error in script "<stdin>" on line 1 -- aborting creation process
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        at ChildProcess.<anonymous> (D:\a\siyuan\siyuan\go\src\github.com\siyuan-note\siyuan\app\node_modules\.pnpm\builder-util@24.13.1\node_modules\builder-util\src\util.ts:252:14)
    at Object.onceWrapper (node:events:633:26)
    at ChildProcess.emit (node:events:518:28)
    at ChildProcess.cp.emit (D:\a\siyuan\siyuan\go\src\github.com\siyuan-note\siyuan\app\node_modules\.pnpm\cross-spawn@7.0.3\node_modules\cross-spawn\lib\enoent.js:34:29)
    at maybeClose (node:internal/child_process:1105:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:[30](https://github.com/siyuan-note/siyuan/actions/runs/8876860253/job/24369309604#step:19:31)5:5)
 ELIFECYCLE  Command failed with exit code 1.

@Soltus
Copy link
Author

Soltus commented Apr 29, 2024

升级 electron 30 后 electron-builder 需要降级到 24.9.1 ,目前只能二选一等上游解决这个问题,这个冲突只影响 action 本地构建没事。我建议降级 electron-builder @88250

@88250
Copy link

88250 commented Apr 29, 2024

@Soltus 多谢指点,我马上试试!

@Soltus
Copy link
Author

Soltus commented Apr 29, 2024

@88250 工作流似乎没有必要现在就升级到 node 22,大部分 action 都是基于 node 20 的,还是保持一致比较好

@Soltus
Copy link
Author

Soltus commented Apr 29, 2024

pnpm 9.0.6 是没问题的 https://github.com/Hi-Windom/Sillot/actions/runs/8868983094/job/24349164505
目前看起来唯一的不同就是 nod 22 了

@88250
Copy link

88250 commented Apr 29, 2024

@Soltus 多谢了,降级 Node 20 和 Builder 24.9.1 后 Action 构建成功了。

@goosewobbler
Copy link

goosewobbler commented May 1, 2024

I'm getting this with 24.13.1 on Windows but 24.13.0 works fine. Using pnpm. I wonder if this is caused by #8052...

EDIT: I was using Electron 30 but verified the issue on v29 as well.

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

No branches or pull requests

4 participants