revert npm logic

This commit is contained in:
pratik
2025-10-15 15:37:35 -05:00
parent 4feb9fe337
commit 2c7c5a1a97
5 changed files with 57 additions and 82 deletions

View File

@@ -9,10 +9,17 @@ WORKDIR /frontend
# Copy package files
COPY frontend/package*.json ./
# Copy .npmrc from frontend directory if it exists (using glob pattern to avoid errors)
# This allows different environments to use different npm registries
# To use: copy your user-level .npmrc to frontend/.npmrc before building
# Unix/Mac: cp ~/.npmrc frontend/.npmrc
# Windows: copy %USERPROFILE%\.npmrc frontend\.npmrc
COPY frontend/.npmr[c] ./ 2>/dev/null || :
# Install dependencies using npm install
# This will use the Docker build environment's npm configuration (.npmrc)
# and generate a package-lock.json appropriate for the configured registry
RUN npm install --legacy-peer-deps
# This will use the .npmrc configuration if present and generate a package-lock.json
# appropriate for the configured registry (Artifactory or public npm)
RUN npm install
# Copy frontend source
COPY frontend/src ./src