fix: Skip prepare script during builder npm ci

The prepare script runs tsc which needs source files, but we haven't
copied them yet during npm ci. Run --ignore-scripts during npm ci,
then explicitly run 'npm run prepare' after copying source files.

This fixes TS18003 'No inputs were found' error in builder stage.
This commit is contained in:
yachi 2025-10-19 19:57:04 +01:00
parent 7c2a55eba5
commit 1a55cd46a1

View File

@ -15,8 +15,8 @@ WORKDIR /app
COPY package*.json ./
COPY tsconfig.json ./
# Install dependencies
RUN npm ci
# Install dependencies (skip prepare script since source isn't copied yet)
RUN npm ci --ignore-scripts
# Copy source code
COPY src ./src