Skip to content

Commit c1dcdb5

Browse files
author
Noa Limoy
committed
fix(dashboard): ensure devDependencies are installed during Docker build
When NODE_ENV=production is set (common in CI environments), npm ci skips devDependencies by default. This causes the build to fail with "tsc: not found" because TypeScript is listed as a devDependency. Adding --include=dev ensures TypeScript, Vite, and other build tools are always installed regardless of environment configuration. This has no impact on the final image size since devDependencies are only used in the build stage and discarded in the multi-stage build. Fixes #752 Signed-off-by: Noa Limoy <nlimoy@nlimoy-thinkpadp1gen7.raanaii.csb>
1 parent 6ace72a commit c1dcdb5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dashboard/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
FROM node:18-alpine AS frontend-builder
33
WORKDIR /app/frontend
44
COPY frontend/package*.json ./
5-
RUN npm ci
5+
RUN npm ci --include=dev # Ensure devDependencies are installed regardless of NODE_ENV
66
COPY frontend/ ./
77
RUN npm run build
88

dashboard/backend/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ COPY dashboard/frontend/package.json dashboard/frontend/package-lock.json dashbo
55
COPY dashboard/frontend/src ./src
66
COPY dashboard/frontend/public ./public
77
COPY dashboard/frontend/index.html ./
8-
RUN npm install
8+
RUN npm install --include=dev # Ensure TypeScript/Vite are installed regardless of NODE_ENV
99
RUN npm run build
1010

1111
# Stage 2: Build backend with Go

0 commit comments

Comments
 (0)