Fix: npm install robustness - explicitly install required packages
This commit is contained in:
@@ -5,8 +5,9 @@ WORKDIR /app
|
|||||||
# Copy package files
|
# Copy package files
|
||||||
COPY backend/package*.json ./
|
COPY backend/package*.json ./
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies - bypass npm bugs
|
||||||
RUN npm install --production --no-audit --no-fund && \
|
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
|
if [ ! -d node_modules/express ]; then echo "ERROR: express not installed" && exit 1; fi
|
||||||
|
|
||||||
# Copy application code
|
# Copy application code
|
||||||
|
|||||||
Reference in New Issue
Block a user