fix: make sure platform binary exists (#7676)

This commit is contained in:
Lifei Zhou
2026-03-05 13:23:27 -05:00
committed by GitHub
parent 42fc5152bf
commit ade0839804
7 changed files with 1119 additions and 351 deletions
+1072 -338
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -56,7 +56,7 @@
"@radix-ui/react-slot": "^1.2.4",
"@radix-ui/react-tabs": "^1.1.13",
"@radix-ui/themes": "^3.3.0",
"@tanstack/react-form": "^1.28.3",
"@tanstack/react-form": "1.28.3",
"@types/react-router-dom": "^5.3.3",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
@@ -71,7 +71,7 @@
"electron-window-state": "^5.0.3",
"express": "^5.2.1",
"framer-motion": "^12.34.3",
"katex": "^0.16.33",
"katex": "0.16.33",
"lodash": "^4.17.23",
"lucide-react": "^0.575.0",
"qrcode.react": "^4.2.0",
@@ -110,7 +110,7 @@
"@electron/fuses": "^1.8.0",
"@electron/remote": "^2.1.3",
"@eslint/js": "^9.39.2",
"@hey-api/openapi-ts": "^0.93.0",
"@hey-api/openapi-ts": "0.93.0",
"@modelcontextprotocol/sdk": "^1.27.0",
"@playwright/test": "^1.58.2",
"@tailwindcss/line-clamp": "^0.4.4",
+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
# Verify package-lock.json has cross-platform optional dependency entries.
#
# npm has a bug where running `npm install` with an existing node_modules/
# prunes platform-specific entries from the lockfile, breaking CI on other platforms.
# See: https://github.com/npm/cli/issues/4828
#
set -euo pipefail
LOCKFILE="${1:-package-lock.json}"
fail=0
grep -q '"node_modules/@esbuild/win32-x64"' "$LOCKFILE" || { echo "MISSING: @esbuild/win32-x64"; fail=1; }
grep -q '"node_modules/@esbuild/linux-x64"' "$LOCKFILE" || { echo "MISSING: @esbuild/linux-x64"; fail=1; }
if [ "$fail" -eq 1 ]; then
echo ""
echo "ERROR: package-lock.json is missing cross-platform optional dependencies."
echo "This happens when 'npm install' is run with an existing node_modules/ directory."
echo ""
echo "To fix, run from ui/desktop/:"
echo " rm -rf node_modules package-lock.json"
echo " npm install"
echo ""
echo "Then commit the regenerated package-lock.json."
exit 1
fi
echo "OK: package-lock.json has cross-platform entries"