fix: downgrade express and chokidar for win7 electron 22 compatibility

This commit is contained in:
xmk23333 2026-01-15 21:23:04 +08:00
parent 5f179d3ea5
commit ea190b9bc1

View File

@ -196,6 +196,8 @@ jobs:
run: | run: |
pnpm install pnpm install
pnpm add -D electron@22.3.27 pnpm add -D electron@22.3.27
# Downgrade packages incompatible with Node.js 16 (Electron 22)
pnpm add express@4.21.2 chokidar@3.6.0
(Get-Content electron-builder.yml) -replace 'windows', 'win7' | Set-Content electron-builder.yml (Get-Content electron-builder.yml) -replace 'windows', 'win7' | Set-Content electron-builder.yml
# Electron 22 requires CJS format # Electron 22 requires CJS format
(Get-Content package.json) -replace '"type": "module"', '"type": "commonjs"' | Set-Content package.json (Get-Content package.json) -replace '"type": "module"', '"type": "commonjs"' | Set-Content package.json