Skip to content

web: put playwright in the lockfile so npm ci can run at all - #65

Merged
thomwolf merged 1 commit into
mainfrom
fix/web-lockfile-sync
Aug 13, 2026
Merged

web: put playwright in the lockfile so npm ci can run at all#65
thomwolf merged 1 commit into
mainfrom
fix/web-lockfile-sync

Conversation

@thomwolf

Copy link
Copy Markdown
Member

npm ci has been impossible in web/ since #37. This makes it work again.

The bug

85a08f0 (#37) added playwright to web/package.json without regenerating web/package-lock.json. npm ci installs only from the lock and refuses to run when the two disagree:

npm error `npm ci` can only install packages when your package.json and
npm error package-lock.json ... are in sync.
npm error Missing: playwright@1.62.1 from lock file
npm error Missing: playwright-core@1.62.1 from lock file
npm error Missing: fsevents@2.3.2 from lock file

So anyone doing a clean frontend install gets nothing, and falls back to borrowing a node_modules from elsewhere on the box — which is how two machine-local node_modules symlinks ended up committed to main and needed #64 to remove.

The fix

npm install --package-lock-only: adds the three missing entries, moves no existing dependency version. Diff is the lock and nothing else.

Verified after the change

  • npm ci → exit 0
  • npm run typecheck (tsc --noEmit) → 0 errors. Worth noting: the 32 "cannot find module" errors people have been seeing were entirely an artefact of incomplete borrowed dependency trees, not the source.
  • All five web suites pass: exchanges, sessionTitle, overviewSort, drafts, traceWindows.

Related, NOT fixed here

traceWindows needs a Chromium that the image doesn't have. Dockerfile:82 installs browsers with npx -y playwright install --with-deps chromiumunpinned, so it fetches whatever is newest at build time instead of the version package.json pins, and || echo "playwright chromium install failed" swallows the failure silently. The running image has chromium-1208; playwright 1.62.1 wants build 1234, so any browser test fails until someone installs it by hand.

I installed the matching build into /opt/pw-browsers on the live box so tests run now, but that is a patch on one machine and it will drift again on the next rebuild. The real fix is to install browsers using the project's own pinned playwright and to stop swallowing the error — deliberately left out of this PR, since changing the image build wants its own review.

🤖 Generated with Claude Code

`playwright` was added to web/package.json in 85a08f0 (#37) without
regenerating web/package-lock.json. `npm ci` refuses to install from a lock
that disagrees with the manifest, so a clean install of the frontend has
been impossible since:

    npm error `npm ci` can only install packages when your package.json and
    npm error package-lock.json ... are in sync.
    npm error Missing: playwright@1.62.1 from lock file
    npm error Missing: playwright-core@1.62.1 from lock file
    npm error Missing: fsevents@2.3.2 from lock file

Regenerated with `npm install --package-lock-only`, so this adds the three
missing entries and changes nothing else — no version of any existing
dependency moves.

After this, `npm ci` exits 0, `tsc --noEmit` reports zero errors, and all
five web suites pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@thomwolf
thomwolf merged commit f56a33f into main Aug 13, 2026
@thomwolf
thomwolf deleted the fix/web-lockfile-sync branch August 13, 2026 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant