Dockerfile: npm install --include=dev to keep autoprefixer at build time
Same fix that landed for RMP cold-build on 2026-05-30. Coolify passes NODE_ENV=production as a buildtime env (set on the app for runtime), which causes npm to skip devDependencies and Next.js's PostCSS pipeline can't load autoprefixer.
This commit is contained in:
@@ -14,7 +14,11 @@ ENV NEXT_PUBLIC_SITE_URL=$NEXT_PUBLIC_SITE_URL
|
||||
ENV NEXT_PUBLIC_GA_MEASUREMENT_ID=$NEXT_PUBLIC_GA_MEASUREMENT_ID
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
# Force dev-deps even if NODE_ENV=production was supplied as a Coolify
|
||||
# build arg — autoprefixer/postcss/tailwindcss live in devDependencies and
|
||||
# Next.js needs them at build time. Same fix that landed for RMP cold-build
|
||||
# on 2026-05-30.
|
||||
RUN npm install --include=dev
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
ENV NODE_ENV=production
|
||||
|
||||
Reference in New Issue
Block a user