Repository navigation
fix(docker): dev frontend installs from the lockfile with npm ci (#4435) - #4436
Merged
Merged
Conversation
docker/frontend/Dockerfile deleted package-lock.json and ran npm install, so every dev-stack build floated the whole dependency tree to the newest registry versions. It now runs npm ci, matching Dockerfile.prod. The lockfile carries the musl bindings for x64 and arm64 (rolldown, lightningcss); vite 8 no longer installs rollup. Built on linux/arm64 and linux/amd64 from a macOS arm64 host: vite build succeeds and 0 installed versions differ from package-lock.json. src/frontend/Dockerfile is removed: nothing builds it and it ran npm install with no lockfile. tests/unit/test_4435_dockerfile_npm_ci.py fails when a tracked Dockerfile installs project dependencies with npm install or deletes a lockfile. Global tool installs (npm install -g) are exempt. Co-Authored-By: Claude Opus 5.5 <[email protected]>
obasilakis
marked this pull request as draft
November 10, 2026 09:40
obasilakis
marked this pull request as ready for review
November 10, 2026 09:44
Contributor
Author
|
Ran the dev frontend from this branch with the compose settings (bind-mounted
|
pavshulin
approved these changes
Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docker/frontend/Dockerfilerunsnpm cifrom the committed lockfile. It no longer deletespackage-lock.json.src/frontend/Dockerfileis removed. Nothing builds it, and it rannpm installwith no lockfile.tests/unit/test_4435_dockerfile_npm_ci.pyfails when a tracked Dockerfile installs project dependencies withnpm install/npm i/npm addor deletes a lockfile.npm install -gis exempt. Matches only at command position, soecho "... npm install ..."text indocker/base-image/Dockerfiledoes not trip it.The January lockfile deletion worked around a missing rollup linux binary. Vite 8 uses rolldown and no longer installs rollup; the lockfile carries musl bindings for x64 and arm64 (rolldown, lightningcss).
Test Plan
cd tests && pytest unit/test_4435_dockerfile_npm_ci.py -v: 15 passed. Red ondevfordocker/frontend/Dockerfileandsrc/frontend/Dockerfile.docker buildx build --no-cache --platform linux/arm64andlinux/amd64ofdocker/frontend/Dockerfile, from a macOS arm64 host: both build on first try.npx vite buildsucceeds (native bindings load);node_modules/.package-lock.jsonvspackage-lock.json: 0 of 422 (arm64) / 0 of 421 (amd64) versions differ.Existing dev stacks keep the old tree in the anonymous
/app/node_modulesvolume. To pick this up:docker compose build --no-cache frontend && docker compose up -d --no-deps --force-recreate -V frontend.Fixes #4435
🤖 Generated with Claude Code