mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-25 17:14:57 +02:00
fix(dx): add node_modules guard to pre-push hook and pin Node 22 (#1368)
Worktrees start with no node_modules, causing tsc to fail with misleading TS2307 errors. The guard auto-runs npm install on first push. .nvmrc pins Node 22 to match CI and avoid Node 24 compat issues.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
# Ensure dependencies are installed (worktrees start with no node_modules)
|
||||
if [ ! -d node_modules ]; then
|
||||
echo "node_modules missing, running npm install..."
|
||||
npm install --prefer-offline || exit 1
|
||||
fi
|
||||
|
||||
echo "Running type check..."
|
||||
npm run typecheck || exit 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user