Skip to content

Commit 618a894

Browse files
ci: add temporary electron install diagnostics
Capture node_modules/electron state after npm ci on the x64 runner and re-run electron's install.js with DEBUG to diagnose the flaky "Electron failed to install correctly" failure. To be reverted. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent f9040b7 commit 618a894

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/code-check.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,29 @@ jobs:
2323
node-version-file: ".nvmrc"
2424
- name: npm ci
2525
run: npm ci
26+
- name: Diagnose electron install (temporary)
27+
if: always()
28+
run: |
29+
set +e
30+
echo "=== env ==="
31+
node -v; npm -v; uname -a
32+
echo "=== node_modules/electron/path.txt ==="
33+
cat node_modules/electron/path.txt 2>/dev/null && echo " [PRESENT]" || echo "[MISSING]"
34+
echo "=== node_modules/electron/dist ==="
35+
ls -la node_modules/electron/dist 2>/dev/null || echo "[no dist]"
36+
echo "=== require('electron') ==="
37+
node -e "try{const p=require('electron');console.log('require OK ->',p)}catch(e){console.log('require FAILED ->',e.message)}"
38+
echo "=== electron resolved versions ==="
39+
node -e "console.log('electron',require('electron/package.json').version)"
40+
node -e "console.log('@electron/get',require('@electron/get/package.json').version)"
41+
node -e "console.log('extract-zip',require('extract-zip/package.json').version)"
42+
echo "=== re-run electron install.js with DEBUG ==="
43+
( cd node_modules/electron && DEBUG='@electron/get*,extract-zip*' node install.js 2>&1 | tail -60 )
44+
echo "install.js exit=$?"
45+
echo "=== path.txt after manual install ==="
46+
cat node_modules/electron/path.txt 2>/dev/null && echo " [PRESENT]" || echo "[STILL MISSING]"
47+
echo "=== dist after manual install ==="
48+
ls node_modules/electron/dist 2>/dev/null | head -20 || echo "[no dist]"
2649
- name: npm run build:ci
2750
run: npm run build:ci
2851
- name: Check for Prettier issues

0 commit comments

Comments
 (0)