Skip to content

Commit 4364aa1

Browse files
committed
Fix Docker build peer dependency failure
Critical Fix: - Copy .npmrc to Docker build context - Add --legacy-peer-deps flag to npm ci in Dockerfile - Fixes E2E test failures and build-and-push workflow failures Root Cause: - @testing-library/react v15 has peer dependency @types/react@^18 - Frontend uses React 19 with @types/react@^19 - .npmrc with legacy-peer-deps=true works locally but wasn't in Docker - Docker npm ci failed with ERESOLVE error Impact: - E2E workflow builds frontend Docker image - was failing - build-and-push workflow builds all images - frontend was failing - These are NOT expected failures - they block the build process Verified: - podman build --target deps succeeds ✅ - npm ci --legacy-peer-deps installs all 833 packages ✅
1 parent 2d8c033 commit 4364aa1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/frontend/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ WORKDIR /app
66
USER 0
77

88
# Install dependencies based on the preferred package manager
9-
COPY package.json package-lock.json* ./
10-
RUN npm ci
9+
COPY package.json package-lock.json* .npmrc ./
10+
RUN npm ci --legacy-peer-deps
1111

1212
# Rebuild the source code only when needed
1313
FROM registry.access.redhat.com/ubi9/nodejs-20-minimal AS builder

0 commit comments

Comments
 (0)