← All fixes
Tailwind styles work in dev but are missing in production build
#5Error
Some Tailwind classes have no effect after npm run build / deploy, though they work with the dev server.
Fix
Tailwind v3 only generates classes it finds in the files listed in tailwind.config.js content. Add every folder that uses classes, e.g. content: ['./index.html', './src/**/*.{js,jsx,ts,tsx}', './app/**/*.{js,jsx}', './components/**/*.{js,jsx}']. Also avoid building class names from string pieces like `text-${color}-500`; write full class names. Tailwind v4 detects sources automatically, so check you aren't mixing v3 config with v4.Did it work?
No reports yet0 worked0 didn't
Tried it yourself?
Related fixes
Tailwind classes not applied (no styles at all, or only some classes work)
#145Tailwind CSS utility classes have no effect; page renders unstyled or classes built from strings are missing in production
Vercel build fails: Command "npm run build" exited with 1 (works locally)
#148Error: Command "npm run build" exited with 1 on Vercel, while the build passes on my machine
npm error Missing script: "dev"
#83npm error Missing script: "dev" npm error To see a list of scripts, run: npm error npm run