Fix Docker build: copy .npmrc + use --legacy-peer-deps for npm ci

vite-plugin-pwa peer-depends on vite <=5 but project uses vite 7 (works fine);
npm ci needs legacy-peer-deps which lives in .npmrc (now copied before install).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Leon Serfaty
2026-06-29 02:48:34 -04:00
co-authored by Claude Opus 4.8
parent fd72540b6a
commit 2be881a3ed
2 changed files with 2 additions and 3 deletions
-1
View File
@@ -1,2 +1 @@
legacy-peer-deps=true legacy-peer-deps=true
npm audit --omit=dev
+2 -2
View File
@@ -11,8 +11,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Install dependencies (full install — tsx/vite are needed for build & runtime) # Install dependencies (full install — tsx/vite are needed for build & runtime)
COPY package.json package-lock.json ./ COPY package.json package-lock.json .npmrc ./
RUN npm ci RUN npm ci --legacy-peer-deps
# Copy source and build the frontend # Copy source and build the frontend
COPY . . COPY . .