From 8456e45206f5c7656c4d24498a9533808cf8eb2c Mon Sep 17 00:00:00 2001 From: Thomas Joise Date: Tue, 21 Jul 2026 01:16:05 +0530 Subject: [PATCH] fix(deploy): drop package-lock.json before container npm install Windows-generated lockfile hits npm/cli#4828 - Linux container build fails resolving @rollup/rollup-linux-x64-gnu even on a fresh npm install. Removing the lockfile before install forces same-platform dependency resolution. Co-Authored-By: Claude Sonnet 5 --- Dockerfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ccee422..842fb7d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,13 @@ WORKDIR /app # Install all workspaces (also fetches puppeteer's Chromium + better-sqlite3 prebuilt # binary for linux-x64), then build the web UI and bundle the server. COPY . . -RUN npm install \ +# package-lock.json is generated on Windows dev machines; npm's optional-dependency +# resolution has a known bug (npm/cli#4828) where a lockfile from one platform doesn't +# pull in another platform's native binaries (here, @rollup/rollup-linux-x64-gnu) even +# though npm install runs fresh in this (Linux) container. Dropping the lockfile before +# install forces a same-platform resolve. +RUN rm -f package-lock.json \ + && npm install \ && npm run build --workspace @sims/hq-web \ && npm run build --workspace @sims/hq