# 🛠 #1899 build preflight — actionable error vs cryptic ENOENT

When you run `npm run build` in a fresh checkout without `node_modules` (very common after `git worktree add`), the build fails 30+ seconds in with a confusing `js-yaml` ENOENT error from inside `packages/hook-contract` codegen. This PR adds a 30-line `scripts/check-install.sh` preflight wired into the root `prebuild` npm script — failing in <1s with a clear "run npm install first" message.

## Toggle state

node_modules present
no node_modules → CRYPTIC FAILURE (before) / CLEAR ERROR (after)

### BEFORE

### AFTER

## The change

    scripts/check-install.sh    NEW · ~30 LOC bash
      - 'set -euo pipefail'
      - Resolve PROJECT_ROOT relative to script
      - If node_modules/ missing:
          · print actionable error to stderr
          · point at git-worktree as the common cause
          · suggest 'npm install' fix
          · exit 1
      - Otherwise: exit 0 silent

    package.json
      prebuild:
    -  "echo '🔨 Building plugins from source...' && bash scripts/sync-shared-scripts.sh"
    +  "bash scripts/check-install.sh && echo '🔨 Building plugins from source...' && bash scripts/sync-shared-scripts.sh"

    tests/build/test-check-install.sh    NEW · 2 cases
      - missing node_modules → exit 1 + actionable stderr
      - present node_modules → exit 0 silent