## Why The canonical `hermes verify` recipe's `bootstrap` phase runs `npm install` against the current lockfile. npm 11's strict resolver rejects `vite-plugin-vue-devtools@7.7.9` (whose own peer-dep is capped at `vite@7`) against the root devDep `vite@8.1.5`, so the bootstrap exits 1 with `ERESOLVE`. The project itself works on every developer machine and in CI because the lockfile + `node_modules` were originally produced by npm 10 (or by `npm ci --ignore-scripts` where `--ignore-scripts` silences install scripts but not peer-dep resolution — the actual install shape survives because the lockfile pins specific resolved versions that no longer match the resolver's strict-mode graph). ## What changed Add `.npmrc` with `legacy-peer-deps=true` so a clean `npm install` against the same lockfile produces the install shape the project already relies on. No `package.json`, no `package-lock.json` mutation. The Dockerfile (`npm ci --ignore-scripts`) and the existing developer install scripts (`npm install`) are unaffected because they already succeed for every developer + CI environment; this only relaxes the strict peer-dep check that npm 11 introduced, which is the precise behavior the lockfile and `node_modules` already encode. ## Verification - `hermes verify --json --skip-start` for the FE workspace before this change: exit 1, `bootstrap` failed at `npm install` on the vite/devtools peer-dep conflict. - `hermes verify --json --skip-start` for the FE workspace after this change: `ok: True`, `bootstrap: ok: True exit: 0 duration_s: 1.021`, `build: ok: True exit: 0 duration_s: 3.497`, `test: ok: True exit: 0 duration_s: 8.232`. The 8.232s `test` phase matches `npm run test:unit:fast` (1359/1359 pass). - `hermes verify --json --skip-start` for the api workspace: `ok: True`, `build: ok: True exit: 0 duration_s: 1.229` (unchanged — api has no npm install step). - `npm run test:unit:fast` after the change: 224 files, 1359 tests pass. - `npm run lint` after the change: 0 errors / 0 warnings. - `npm run i18n:v2:check` after the change: source-check, global-template-audit, template-dedupe-audit, word-audit all green. - `npm run build` after the change: built successfully, PWA precache 726 entries. ## Why not bump `vite-plugin-vue-devtools` or pin `vite` overrides Bumping the devtools package is a substantive change that risks a larger behavioral surface change; pinning `vite` via `overrides` would force a single vite version across every package that uses it (vue, vite-plugin-vue, vite-plugin-vue-jsx, vitest, etc.) and likely cause more peer-dep breakage than it fixes. The `.npmrc` flag is the minimal, surgical change that aligns the resolver's behavior with the install shape the lockfile already encodes. Co-authored-by: Hermes Agent <agent@truckwash.io>
2 lines
22 B
Plaintext
2 lines
22 B
Plaintext
legacy-peer-deps=true
|