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
This commit is contained in:
Francesco
2026-02-20 04:06:16 +00:00
parent d9e61d58a0
commit b6b749ad60
4 changed files with 25 additions and 4 deletions

View File

@@ -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* ./

20
backend/Dockerfile.fixed Normal file
View File

@@ -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"]

View File

@@ -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"
}
}

View File

@@ -1,6 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
'@tailwindcss/postcss': {},
autoprefixer: {},
},
}