ENOENT: no such file or directory, rename '~\wp-downloader-electron\dist\win-arm64\win-arm64-unpacked\electron.exe' - No electron.exe found - When building for arm64 - Windows
- Electron-Builder Version: 25.1.8
- Node Version: 22.8.0
- Electron Version: 33.2.0
- Electron Type (current, beta, nightly): current
- Target: nsis, zip, 7z, portable, msi
win:
target:
- target: nsis
arch: [x64, ia32, arm64]
- target: msi
arch: [x64, ia32, arm64]
- target: portable
arch: [x64, ia32, arm64]
- target: zip
arch: [x64, ia32, arm64]
- target: 7z
arch: [x64, ia32, arm64]
executableName: wp-downloader-electron
nsis:
artifactName: ${name}-${version}-setup.${ext}
shortcutName: ${productName}
uninstallDisplayName: ${productName}
createDesktopShortcut: always
npmRebuild: true
publish:
provider: generic
url: https://example.com/auto-updates
electronDownload:
mirror: https://npmmirror.com/mirrors/electron/
Above is a part of my electron-builder.yml. And I'm running on x64 bit Windows.
When I build articatcs
- With electron-builder --win or
- With electron-builder --win --arm64
locally (windows-x64) and github hosted runners (windows-latest), building unpack fails, no electron.exe found.
Console log:
> electron-builder --win --arm64
• electron-builder version=25.1.8 os=10.0.22631
• loaded configuration file=C:\Users\Dragon\Documents\GitHub\wp-downloader-electron\electron-builder.yml
• writing effective config file=dist\builder-effective-config.yaml
• executing @electron/rebuild electronVersion=33.2.0 arch=arm64 buildFromSource=false appDir=./
• installing native dependencies arch=arm64
• completed installing native dependencies
• packaging platform=win32 arch=arm64 electron=33.2.0 appOutDir=dist\win-arm64\win-arm64-unpacked
⨯ ENOENT: no such file or directory, rename 'C:\Users\Dragon\Documents\GitHub\wp-downloader-electron\dist\win-arm64\win-arm64-unpacked\electron.exe' -> 'C:\Users\Dragon\Documents\GitHub\wp-downloader-electron\dist\win-arm64\win-arm64-unpacked\wp-downloader-electron.exe' failedTask=build stackTrace=Error: ENOENT: no such file or directory, rename 'C:\Users\Dragon\Documents\GitHub\wp-downloader-electron\dist\win-arm64\win-arm64-unpacked\electron.exe' -> 'C:\Users\Dragon\Documents\GitHub\wp-downloader-electron\dist\win-arm64\win-arm64-unpacked\wp-downloader-electron.exe'
And indeed there's no electron.exe (or any other renamed executable) in dirst/win-arm64-unpacked dir.
I've tried using nightly/alpha versions of electron and electron-builder -> Didn't work.
I also checked if this's a issue with electron-binaries not providing a electron.exe, by any chance -> Electron binaries indeed have electron.exe
So, what I guess it that electron-builder either removes electron.exe or can't copy. As far I know there's nothing to do with electron.exe except for changing the icon and renaming.
[!NOTE] I'm new to
electron-builder, so am I doing something wrong when building for arm64 on Windows? I mean, is there any specific requirements? (I couldn't find any in the documentation). If there's any, please leave a link.
⨯ ENOENT: no such file or directory, rename '~\wp-downloader-electron\dist\win-arm64\win-arm64-unpacked\electron.exe' -> '~\wp-downloader-electron\dist\win-arm64\win-arm64-unpacked\wp-downloader-electron.exe' failedTask=build
This smells like a bug. You're building on windows but the command rename '~\wp-downloader-electron has a ~ at the front of it? Did you do that for this? "The directory pathes are correct and there's full directory path. (I've omiited them here)"
Yeah, I meant, that I had full paths in terminal outputs, I removed them here thinking it'd better to have a look. Updated though.
So it was like this
⨯ ENOENT: no such file or directory, rename 'C:\Users\Dragon\Documents\GitHub\wp-downloader-electron\dist\win-arm64\win-arm64-unpacked\electron.exe' -> 'C:\Users\Dragon\Documents\GitHub\wp-downloader-electron\dist\win-arm64\win-arm64-unpacked\wp-downloader-electron.exe' failedTask=build
Sorry if it made any confusion.
Hello, have you solved your problem
Nope, I still couldn’t find anything, and I’m not sure if I’m doing something wrong either.
I’m not sure why, as I didn’t make any changes, but it successfully built a moment ago. It might be an issue with Electron or the build environment. I’ll go ahead and close this issue.
I got the error again.
Complete log
Job: https://github.com/sipsuru/wp-downloader-electron/actions/runs/11951692308/job/33315828519
Run npm run build:win npm run build:win shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'" env: NODE_JS_VERSION: 23.1.0
> [email protected] build:win
> electron-builder --win
• electron-builder version=25.1.8 os=10.0.20[3](https://github.com/sipsuru/wp-downloader-electron/actions/runs/11951692308/job/33315828519#step:8:3)48
• artifacts will be published if draft release exists reason=CI detected
• loaded configuration file=D:\a\wp-downloader-electron\wp-downloader-electron\electron-builder.yml
• executing @electron/rebuild electronVersion=33.2.0 arch=x6[4](https://github.com/sipsuru/wp-downloader-electron/actions/runs/11951692308/job/33315828519#step:8:4) buildFromSource=false appDir=./
• installing native dependencies arch=x64
• completed installing native dependencies
• packaging platform=win32 arch=x64 electron=33.2.0 appOutDir=dist\win-unpacked
• downloading url=https://npmmirror.com/mirrors/electron/v33.2.0/electron-v33.2.0-win32-x64.zip size=11[5](https://github.com/sipsuru/wp-downloader-electron/actions/runs/11951692308/job/33315828519#step:8:5) MB parts=8
• downloaded url=https://npmmirror.com/mirrors/electron/v33.2.0/electron-v33.2.0-win32-x[6](https://github.com/sipsuru/wp-downloader-electron/actions/runs/11951692308/job/33315828519#step:8:7)4.zip duration=1.147s
• updating asar integrity executable resource executablePath=dist\win-unpacked\wp-downloader-electron.exe
• downloading url=https://npmmirror.com/mirrors/electron-builder-binaries/winCodeSign-2.6.0/winCodeSign-2.6.0.[7](https://github.com/sipsuru/wp-downloader-electron/actions/runs/11951692308/job/33315828519#step:8:8)z size=5.6 MB parts=1
• downloaded url=https://npmmirror.com/mirrors/electron-builder-binaries/winCodeSign-2.6.0/winCodeSign-2.6.0.7z duration=2.5[8](https://github.com/sipsuru/wp-downloader-electron/actions/runs/11951692308/job/33315828519#step:8:9)6s
• signing with signtool.exe path=dist\win-unpacked\wp-downloader-electron.exe
• no signing info identified, signing is skipped signHook=false cscInfo=null
• building target=MSI arch=x64 file=dist\wp-downloader-electron 1.0.0.msi
• building target=zip arch=x64 file=dist\wp-downloader-electron-1.0.0-win.zip
• building target=7z arch=x64 file=dist\wp-downloader-electron-1.0.0-win.7z
• executing @electron/rebuild electronVersion=33.2.0 arch=ia32 buildFromSource=false appDir=./
• installing native dependencies arch=ia32
• downloading url=https://npmmirror.com/mirrors/electron-builder-binaries/wix-4.0.0.5512.2/wix-4.0.0.5512.2.7z size=2.2 MB parts=1
• completed installing native dependencies
• downloaded url=https://npmmirror.com/mirrors/electron-builder-binaries/wix-4.0.0.5512.2/wix-4.0.0.5512.2.7z duration=6.742s
• packaging platform=win32 arch=ia32 electron=33.2.0 appOutDir=dist\win-ia32-unpacked
• downloading url=https://npmmirror.com/mirrors/electron/v33.2.0/electron-v33.2.0-win32-ia32.zip size=107 MB parts=8
• downloaded url=https://npmmirror.com/mirrors/electron/v33.2.0/electron-v33.2.0-win32-ia32.zip duration=15.035s
• updating asar integrity executable resource executablePath=dist\win-ia32-unpacked\wp-downloader-electron.exe
• signing with signtool.exe path=dist\win-ia32-unpacked\wp-downloader-electron.exe
• no signing info identified, signing is skipped signHook=false cscInfo=null
• building target=MSI arch=ia32 file=dist\wp-downloader-electron 1.0.0 ia32.msi
• building target=zip arch=ia32 file=dist\wp-downloader-electron-1.0.0-ia32-win.zip
• building target=7z arch=ia32 file=dist\wp-downloader-electron-1.0.0-ia32-win.7z
• executing @electron/rebuild electronVersion=33.2.0 arch=arm64 buildFromSource=false appDir=./
• installing native dependencies arch=arm64
• completed installing native dependencies
• packaging platform=win32 arch=arm64 electron=33.2.0 appOutDir=dist\win-arm64-unpacked
• downloading url=https://npmmirror.com/mirrors/electron/v33.2.0/electron-v33.2.0-win32-arm64.zip size=120 MB parts=8
• retrying attempt=1
• retrying attempt=1
• signing with signtool.exe path=dist\wp-downloader-electron 1.0.0.msi
• no signing info identified, signing is skipped signHook=false cscInfo=null
• signing with signtool.exe path=dist\wp-downloader-electron 1.0.0 ia32.msi
• no signing info identified, signing is skipped signHook=false cscInfo=null
• downloaded url=https://npmmirror.com/mirrors/electron/v33.2.0/electron-v33.2.0-win32-arm64.zip duration=5m53.[9](https://github.com/sipsuru/wp-downloader-electron/actions/runs/11951692308/job/33315828519#step:8:10)01s
⨯ ENOENT: no such file or directory, rename 'D:\a\wp-downloader-electron\wp-downloader-electron\dist\win-arm64-unpacked\electron.exe' -> 'D:\a\wp-downloader-electron\wp-downloader-electron\dist\win-arm64-unpacked\wp-downloader-electron.exe' failedTask=build stackTrace=Error: ENOENT: no such file or directory, rename 'D:\a\wp-downloader-electron\wp-downloader-electron\dist\win-arm64-unpacked\electron.exe' -> 'D:\a\wp-downloader-electron\wp-downloader-electron\dist\win-arm64-unpacked\wp-downloader-electron.exe'
I remoed target portable and then this happened.
And here the previous succesfull jobs (when having portable target.
So as far I understand, portable target replaced my nsis target back then, and when I removed portable target, I got the error again.
My solution is to set the electronList property in the build attribute of packagejson, with "electronList": "./main/electronList" Then compress the corresponding version of my electron into the folder corresponding to the electronList attribute,
So I took a look at this and am unable to reproduce it. I also added a test case to the windows-latest CI runner and the test still passed successfully
https://github.com/electron-userland/electron-builder/blob/993a077fffce68cb7bcc8442423dc0ee2daae874/test/src/windows/winPackagerTest.ts#L39-L49
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
Did someone find the reason for this? I too am stuck in this.
No, I never identified a reason as to why. FWIW, I'm migrating this entire section of code to use electron/get directly in: https://github.com/electron-userland/electron-builder/pull/8827
It's just a draft for now and will be in the next major release, which will be timed with electron upstream's upgrade to minimum node 22
找到原因了吗,我也遇到了
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
The similar "ENOENT ... rename" error occurred when I tried electron-builder build in project root. It took me some time to find out that it's caused by the corrupted cached electron-v36.4.0-darwin-arm64.zip. This file is downloaded by app-builder in the building process and might be corrupted by network change. After it's deleted and redownloaded, the error is gone.
For macOS, the cache directory is ~/Library/Caches/electron, which could be found at artifactDownloader of app-builder
Here's how I verified if it's cached on my machine:
# Nothing output if the zip file is cached
❯ node_modules/.pnpm/[email protected]/node_modules/app-builder-bin/mac/app-builder_arm64 unpack-electron --configuration '[{"platform":"darwin","arch":"arm64","version":"36.4.0"}]' --output dist/mac-arm64 --distMacOsAppName Electron.app
# Downloaded file is shown if it's not cached locally
❯ node_modules/.pnpm/[email protected]/node_modules/app-builder-bin/mac/app-builder_arm64 unpack-electron --configuration '[{"platform":"darwin","arch":"arm64","version":"36.4.0"}]' --output dist/mac-arm64 --distMacOsAppName Electron.app
• downloading url=https://github.com/electron/electron/releases/download/v36.4.0/electron-v36.4.0-darwin-arm64.zip size=109 MB parts=8
• downloaded url=https://github.com/electron/electron/releases/download/v36.4.0/electron-v36.4.0-darwin-arm64.zip duration=10.3s
For now app-builder don't do integrity-check on downloaded files, so anyone saw this error could try deleting the cache and see if it works.
I also get the rename error. ⨯ ENOENT: no such file or directory, rename 'C:\Users\Steve\Desktop\PM-Mail\dist\win-unpacked\electron.exe' -> 'C:\Users\Steve\Desktop\PM-Mail\dist\win-unpacked\Proton Mail.exe' failedTask=build stackTrace=Error: ENOENT: no such file or directory, rename 'C:\Users\Steve\Desktop\PM-Mail\dist\win-unpacked\electron.exe' -> 'C:\Users\Steve\Desktop\PM-Mail\dist\win-unpacked\Proton Mail.exe' v 37.1.0
so anyone saw this error could try deleting the cache and see if it works.
Didn't work for me. 😔
The similar "ENOENT ... rename" error occurred when I tried
electron-builder buildin project root. It took me some time to find out that it's caused by the corrupted cachedelectron-v36.4.0-darwin-arm64.zip. This file is downloaded byapp-builderin the building process and might be corrupted by network change. After it's deleted and redownloaded, the error is gone.For macOS, the cache directory is
~/Library/Caches/electron, which could be found at artifactDownloader of app-builderHere's how I verified if it's cached on my machine:
# Nothing output if the zip file is cached ❯ node_modules/.pnpm/[email protected]/node_modules/app-builder-bin/mac/app-builder_arm64 unpack-electron --configuration '[{"platform":"darwin","arch":"arm64","version":"36.4.0"}]' --output dist/mac-arm64 --distMacOsAppName Electron.app # Downloaded file is shown if it's not cached locally ❯ node_modules/.pnpm/[email protected]/node_modules/app-builder-bin/mac/app-builder_arm64 unpack-electron --configuration '[{"platform":"darwin","arch":"arm64","version":"36.4.0"}]' --output dist/mac-arm64 --distMacOsAppName Electron.app • downloading url=https://github.com/electron/electron/releases/download/v36.4.0/electron-v36.4.0-darwin-arm64.zip size=109 MB parts=8 • downloaded url=https://github.com/electron/electron/releases/download/v36.4.0/electron-v36.4.0-darwin-arm64.zip duration=10.3sFor now app-builder don't do integrity-check on downloaded files, so anyone saw this error could try deleting the cache and see if it works.
Thanks, this works for me.
The similar "ENOENT ... rename" error occurred when I tried
electron-builder buildin project root. It took me some time to find out that it's caused by the corrupted cachedelectron-v36.4.0-darwin-arm64.zip. This file is downloaded byapp-builderin the building process and might be corrupted by network change. After it's deleted and redownloaded, the error is gone.For macOS, the cache directory is
~/Library/Caches/electron, which could be found at artifactDownloader of app-builderHere's how I verified if it's cached on my machine:
# Nothing output if the zip file is cached ❯ node_modules/.pnpm/[email protected]/node_modules/app-builder-bin/mac/app-builder_arm64 unpack-electron --configuration '[{"platform":"darwin","arch":"arm64","version":"36.4.0"}]' --output dist/mac-arm64 --distMacOsAppName Electron.app # Downloaded file is shown if it's not cached locally ❯ node_modules/.pnpm/[email protected]/node_modules/app-builder-bin/mac/app-builder_arm64 unpack-electron --configuration '[{"platform":"darwin","arch":"arm64","version":"36.4.0"}]' --output dist/mac-arm64 --distMacOsAppName Electron.app • downloading url=https://github.com/electron/electron/releases/download/v36.4.0/electron-v36.4.0-darwin-arm64.zip size=109 MB parts=8 • downloaded url=https://github.com/electron/electron/releases/download/v36.4.0/electron-v36.4.0-darwin-arm64.zip duration=10.3sFor now app-builder don't do integrity-check on downloaded files, so anyone saw this error could try deleting the cache and see if it works.
What is the path for windows?
What is the path for windows?
I guess ~/AppData/Local/electron/Cache/.
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment, or this will be closed in 30 days.
This issue was closed because it has been stalled for 30 days with no activity.