[CHIA-4294] Fixed Electron source install not working (#21105)

Fixed Electron source install not working
This commit is contained in:
Izumi Hoshino
2026-08-21 10:06:52 -07:00
committed by GitHub
parent 4b16648106
commit d61ed07dee
2 changed files with 20 additions and 0 deletions
+10
View File
@@ -33,6 +33,16 @@ try {
$ErrorActionPreference = "SilentlyContinue" $ErrorActionPreference = "SilentlyContinue"
npm ci --loglevel=error npm ci --loglevel=error
npm audit fix npm audit fix
# Work around Electron's postinstall being silently skipped in the workspaces/
# hoisted install, which leaves node_modules/electron present but without its
# platform binary (no path.txt). Re-run Electron's own installer if needed.
# Otherwise 'npm run electron' fails with "Electron failed to install correctly".
if (-not (Test-Path "node_modules/electron/path.txt")) {
Write-Output "Electron binary is missing; running Electron's install script."
node node_modules/electron/install.js
}
npm run build npm run build
py ..\installhelper.py py ..\installhelper.py
+10
View File
@@ -105,6 +105,16 @@ if [ ! "$CI" ]; then
npm ci npm ci
npm audit fix || true npm audit fix || true
# Work around Electron's postinstall being silently skipped in the workspaces/
# hoisted install, which leaves node_modules/electron present but without its
# platform binary (no path.txt). Re-run Electron's own installer if needed.
# Otherwise `npm run electron` fails with "Electron failed to install correctly".
if [ ! -f node_modules/electron/path.txt ]; then
echo "Electron binary is missing; running Electron's install script."
node node_modules/electron/install.js
fi
npm run build npm run build
# Set modified output of `chia version` to version property of GUI's package.json # Set modified output of `chia version` to version property of GUI's package.json