Open minai621 opened 1 month ago
Does this reproduce locally as well?
There should be a file at C:\Users\<user name>\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\Bin/makensis.exe
@mmaietta
Does this reproduce locally as well?
There should be a file at
C:\Users\<user name>\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\Bin/makensis.exe
makensis.exe exists locally on my machine. It can only not be found in the GitHub Actions CI environment.
Tbh, I've never seen this issue before and electron-builder's unit tests run on the latest windows/mac/ubuntu runners without issue, so I'm confused as to why that file doesn't exist in the github runner. Was this working previously for you?
To block you in the interim, can you set this var to the directory that 3.10.0 makensis.exe
exists in and see if that resolves your issue for now?
process.env.ELECTRON_BUILDER_NSIS_DIR = <path to directory containing makensis.exe>
@mmaietta In local machine testing:
makensis.exe
(makensis.exe
exists in the actual path).You can reproduce this issue using the GitHub repository at https://github.com/minai621/builder-test
To reproduce on Windows:
pnpm install
pnpm run release
The error occurs during the NSIS step of the build process.
@beyondkmp would you be willing to take a look at this?
@mmaietta I'm facing build failures on my local Windows machine. There's an ongoing issue where the spawn command fails to execute nsis.exe. Would you please confirm if Windows builds work properly with these versions
The GH CI/CD runs on node 18 currently, and all historical CI runs completed successfully on master
branch as well, so yes, Windows builds work properly with node 18 and eb 25.1.8. Version of electron shouldn't matter
Using pnpx will report an error about makensis.exe not being found. Because Windows has a maximum path length of 260 characters. This can be resolved by setting pnpm config -g set virtual-store-dir-max-length 60
to control the length.
https://github.com/pnpm/pnpm/issues/8402#issuecomment-2279614428
However, my recommendation is to avoid using pnpx and instead directly use pnpm run build/release
. This way, it will use files directly from node_modules, and the path length won't exceed 260 characters.
When using windows@latest as the GitHub Actions runner OS, the default version of NSIS is 3.10.0.
However, electron-builder requires version 3.0.4.1, and because it cannot find this version, the following error occurs:
Here is my action script
My package.json build configuration is as follows
It seems that the issue is related to the cache for NSIS
electron-builder\Cache\nsis\nsis-3.0.4.1\Bin\makensis.exe ENOENT
Could you help me understand why this issue occurs and what might be causing the cache problem?