Fix: npm install robustness - explicitly install required packages

This commit is contained in:
innotex
2026-02-05 00:35:24 +01:00
parent 778a3c77c4
commit de89cf1ecb

View File

@@ -5,8 +5,9 @@ WORKDIR /app
# Copy package files
COPY backend/package*.json ./
# Install dependencies
RUN npm install --production --no-audit --no-fund && \
# Install dependencies - bypass npm bugs
RUN npm ci --omit=dev || npm install --omit=dev || true && \
npm install --save express express-session bcryptjs dotenv cors multer fs-extra && \
if [ ! -d node_modules/express ]; then echo "ERROR: express not installed" && exit 1; fi
# Copy application code