Cannot apply unknown utility class "from-background" with Next.js 15 + Turbopack #19105
-
| Environment
 Steps to Reproduce
 npx create-next-app@latest client --typescript --tailwind
cd client
 @tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
  body {
    @apply bg-gradient-to-br from-background via-light to-accent;
    @apply min-h-screen;
  }
}
 /** @type {import('tailwindcss').Config} */
module.exports = {
  content: ["./src/**/*.{js,ts,jsx,tsx}"],
  theme: {
    extend: {
      colors: {
        background: "#f5f5f5",
        light: "#e0e0e0",
        accent: "#ff5722",
      },
    },
  },
  plugins: [],
};
 npm run devExpected Behavior
 Actual BehaviorAdditional Context
 | 
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
| You seem to have mixed v3 and v4 installation instructions. For step 2: -@tailwind base;
-@tailwind components;
-@tailwind utilities;
+@import "tailwindcss";
For step 3, delete the   @import "tailwindcss";
+@theme {
+  --color-background: #f5f5f5;
+  --color-light: #e0e0e0;
+  --color-accent: #ff5722;
+}
+
 @layer base {
   body {
     @apply bg-gradient-to-br from-background via-light to-accent;
     @apply min-h-screen;
   }
 } | 
Beta Was this translation helpful? Give feedback.
-
| Hi bro, Thank you so much for your help! Everything is working perfectly now. Honestly, it’s a good reminder — this is exactly what happens when you try to learn and solve issues with AI: you think it’s complicated, but in the end the problem was pretty simple . You just have to stay up-to-date with the tech. Really appreciate your guidance! Best regards, | 
Beta Was this translation helpful? Give feedback.
You seem to have mixed v3 and v4 installation instructions.
For step 2:
For step 3, delete the
tailwind.config.jsfile. Tailwind is configured in CSS: