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 <noreply@anthropic.com>
main
Thomas Joise 1 day ago
parent 12e95e7be4
commit 8456e45206

@ -18,7 +18,13 @@ WORKDIR /app
# Install all workspaces (also fetches puppeteer's Chromium + better-sqlite3 prebuilt # Install all workspaces (also fetches puppeteer's Chromium + better-sqlite3 prebuilt
# binary for linux-x64), then build the web UI and bundle the server. # binary for linux-x64), then build the web UI and bundle the server.
COPY . . 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-web \
&& npm run build --workspace @sims/hq && npm run build --workspace @sims/hq

Loading…
Cancel
Save