electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.46k stars 1.71k forks source link

process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE #8263

Closed hanxiang-li closed 1 week ago

hanxiang-li commented 2 weeks ago
beyondkmp commented 2 weeks ago

From your screenshot, it seems you are compiling the Windows version build on a Mac, which is causing the issue. Have you always been compiling the Windows installer package on a Mac?

hanxiang-li commented 2 weeks ago

From your screenshot, it seems you are compiling the Windows version build on a Mac, which is causing the issue. Have you always been compiling the Windows installer package on a Mac?

Yes, this issue occurs when my project folder name exceeds 32 bytes. Windows system compilation is not a problem, but there is a problem with Mac. If I set the folder name to be less than 32 bytes, there will be no problem

beyondkmp commented 2 weeks ago
image

Cannot reproduce in my computer. Can you provide a minimal reproduction example ?

hanxiang-li commented 2 weeks ago

Cannot reproduce in my computer. Can you provide a minimal reproduction example ?

image

Excuse me, are you using Mac to package the win? This is a demo, and I am unable to package it properly during testing

1. pnpm install
2. pnpm run build:win

test-test-test-test-test-test-test-test-test-test.zip

hanxiang-li commented 2 weeks ago

Cannot reproduce in my computer. Can you provide a minimal reproduction example ? version: node: v20.14.0 pnpm: 9.4.0 mac: sonoma 14.5

beyondkmp commented 2 weeks ago

cannot reproduce from your demo.

image

@hanxiang-li You can get much more error info with export DEBUG=electron-builder

hanxiang-li commented 2 weeks ago

cannot reproduce from your demo.

`work@lhx test-test-test-test-test-test-test-test-test-test % pnpm run build:win

test-test-test-test-test-test-test-test-test-test@1.0.0 build:win /Users/work/Downloads/test-test-test-test-test-test-test-test-test-test npm run build && electron-builder --win

test-test-test-test-test-test-test-test-test-test@1.0.0 build npm run typecheck && electron-vite build

test-test-test-test-test-test-test-test-test-test@1.0.0 typecheck npm run typecheck:node && npm run typecheck:web

test-test-test-test-test-test-test-test-test-test@1.0.0 typecheck:node tsc --noEmit -p tsconfig.node.json --composite false

test-test-test-test-test-test-test-test-test-test@1.0.0 typecheck:web vue-tsc --noEmit -p tsconfig.web.json --composite false

vite v5.3.1 building SSR bundle for production... ✓ 2 modules transformed. out/main/index.js 1.48 kB ✓ built in 116ms vite v5.3.1 building SSR bundle for production... ✓ 1 modules transformed. out/preload/index.js 0.42 kB ✓ built in 10ms vite v5.3.1 building for production... ✓ 13 modules transformed. ../../out/renderer/index.html 0.55 kB ../../out/renderer/assets/electron-DtwWEc_u.svg 5.82 kB ../../out/renderer/assets/index-CsbMxbyG.css 6.74 kB ../../out/renderer/assets/index-BnHjTmbH.js 162.72 kB ✓ built in 505ms • electron-builder version=24.13.3 os=23.5.0 • loaded configuration file=/Users/work/Downloads/test-test-test-test-test-test-test-test-test-test/electron-builder.yml • effective config config=directories: output: dist buildResources: build appId: com.electron.app productName: test-test-test-test-test-test-test-test-test-test files:

This is all the logs

hanxiang-li commented 2 weeks ago

cannot reproduce from your demo.

If "test-test-test-test-test-test-test-test-test-test“ is changed to ”test-test-test-test“, I can succeed image

beyondkmp commented 1 week ago

I can reproduce your issue. Currently, the problem occurs when the cwd directory exceeds 255 characters, which seems to be related to the Windows directory length limit. Therefore, it is best not to exceed 255 characters in the Windows directory path.

image
hanxiang-li commented 1 week ago

yes,Thank you for your support