fix: set NODE_ENV=development in sync builder to install devDependencies
node:20-slim defaults NODE_ENV=production which causes npm to skip dev deps (typescript, ts-node), preventing tsc from being found. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
FROM node:20-slim AS builder
|
FROM node:20-slim AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package.json package-lock.json ./
|
COPY package.json package-lock.json ./
|
||||||
RUN npm install
|
RUN NODE_ENV=development npm install
|
||||||
COPY tsconfig.json ./
|
COPY tsconfig.json ./
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
RUN ./node_modules/.bin/tsc && npm prune --production
|
RUN ./node_modules/.bin/tsc && npm prune --production
|
||||||
|
|||||||
Reference in New Issue
Block a user