From ed2a47e7f9793b388b3701ebfd6391a2354e4599 Mon Sep 17 00:00:00 2001 From: "benjamin.baker" Date: Wed, 2 Sep 2026 08:13:21 -0400 Subject: [PATCH] install frontend devDependencies explicitly in the build stage vite and the build toolchain live under devDependencies; proxied/base-image npm defaults to omit=dev, leaving 'vite: not found' at build time. Force --include=dev so the build stage always has its toolchain. --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 318240fd..b8bb1db8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,10 +45,14 @@ COPY frontend/package*.json ./frontend/ # guard keeps NODE_EXTRA_CA_CERTS unset on a clean checkout (no cert), so Node # does not warn about a missing cert path; a proxy-inspected build still gets # the cert because the file is present. +# Force devDependencies in: vite and the rest of the build toolchain live under +# devDependencies, and some base images / proxied environments default npm to +# omit=dev, which leaves `vite: not found` at build time. A build stage always +# needs them, so include them explicitly regardless of the ambient NODE_ENV. RUN if [ -f /usr/local/share/ca-certificates/corp-root-ca.crt ]; then \ export NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/corp-root-ca.crt; \ fi; \ - cd frontend && npm ci + cd frontend && npm ci --include=dev # The frontend keeps its repo-relative layout here, because npm prebuild runs # `node ../scripts/stage-frontend.mjs`, which stages each plugin's frontend/ into