fix(docker): add --legacy-peer-deps to npm ci for svelte-markdown@0.4.1 compat
svelte-markdown@0.4.1 declares peer dependency svelte@^4.0.0, but the project uses svelte@^5.43.8. In clean Docker builds, npm ci strictly validates peer deps and fails. Adding --legacy-peer-deps works around the incompatibility until svelte-markdown supports Svelte 5.
This commit is contained in:
@@ -69,7 +69,7 @@ services:
|
||||
- /tmp/playwright-report:/workspace/frontend/playwright-report
|
||||
command: >
|
||||
sh -c "
|
||||
npm ci &&
|
||||
npm ci --legacy-peer-deps &&
|
||||
npx playwright install chromium &&
|
||||
npx playwright test
|
||||
"
|
||||
|
||||
@@ -16,7 +16,7 @@ WORKDIR /app/frontend
|
||||
|
||||
# Install deps (layer cache when package.json unchanged)
|
||||
COPY frontend/package.json frontend/package-lock.json* ./
|
||||
RUN npm ci --prefer-offline --no-audit --no-fund
|
||||
RUN npm ci --prefer-offline --no-audit --no-fund --legacy-peer-deps
|
||||
|
||||
# Build frontend
|
||||
COPY frontend/ ./
|
||||
|
||||
@@ -13,7 +13,7 @@ FROM node:20-alpine AS build
|
||||
WORKDIR /app/frontend
|
||||
|
||||
COPY frontend/package*.json ./
|
||||
RUN npm ci
|
||||
RUN npm ci --legacy-peer-deps
|
||||
|
||||
COPY frontend/ ./
|
||||
RUN npm run build
|
||||
|
||||
Reference in New Issue
Block a user