From b6b749ad606b301cd89ab4513626a78cd9d5a1d6 Mon Sep 17 00:00:00 2001 From: Francesco Date: Fri, 20 Feb 2026 04:06:16 +0000 Subject: [PATCH] fix: Update npm to latest version and fix Tailwind v4 PostCSS configuration - Install @tailwindcss/postcss for Tailwind v4 compatibility - Update postcss.config.js to use new Tailwind PostCSS plugin - Update npm to latest version in backend Dockerfile - Fixes build failures with Next.js 16.1.6 and Tailwind CSS v4.2.0 --- backend/Dockerfile | 4 ++-- backend/Dockerfile.fixed | 20 ++++++++++++++++++++ frontend/package.json | 3 ++- frontend/postcss.config.js | 2 +- 4 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 backend/Dockerfile.fixed diff --git a/backend/Dockerfile b/backend/Dockerfile index af64bb2..3bddc71 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,8 +1,8 @@ FROM node:20-alpine AS base WORKDIR /app -# Install Bun -RUN npm install -g bun +# Install Bun and update npm +RUN npm install -g bun && npm install -g npm@latest # Install dependencies COPY package.json bun.lockb* ./ diff --git a/backend/Dockerfile.fixed b/backend/Dockerfile.fixed new file mode 100644 index 0000000..af64bb2 --- /dev/null +++ b/backend/Dockerfile.fixed @@ -0,0 +1,20 @@ +FROM node:20-alpine AS base +WORKDIR /app + +# Install Bun +RUN npm install -g bun + +# Install dependencies +COPY package.json bun.lockb* ./ +RUN bun install + +# Copy source code +COPY . . + +ENV NODE_ENV=production +ENV PORT=3001 + +EXPOSE 3001 + +# Run directly from TypeScript source (Bun can execute TypeScript directly) +CMD ["bun", "run", "src/index.ts"] diff --git a/frontend/package.json b/frontend/package.json index df3fc7d..69c5023 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -31,6 +31,7 @@ "typescript": "^5.9.3", "tailwindcss": "^4.2.0", "postcss": "^8.5.6", - "autoprefixer": "^10.4.24" + "autoprefixer": "^10.4.24", + "@tailwindcss/postcss": "^4.0.0" } } diff --git a/frontend/postcss.config.js b/frontend/postcss.config.js index 33ad091..668a5b9 100644 --- a/frontend/postcss.config.js +++ b/frontend/postcss.config.js @@ -1,6 +1,6 @@ module.exports = { plugins: { - tailwindcss: {}, + '@tailwindcss/postcss': {}, autoprefixer: {}, }, }