Replies: 9 comments 14 replies
-
I tried compiling the styles with Tailwind CLI |
Beta Was this translation helpful? Give feedback.
-
Ok, so non-ideal solution is. We leave the ./styles/global.css (or any other folder with base CSS file) where the basic tailwind configuration is like And for example, in the app folder, we create a second empty |
Beta Was this translation helpful? Give feedback.
-
This ought to be something with the environment you are running things on. Make sure all packages are up to date. Also if the I've tested both on local mac and linux (vercel deployment) and the tailwind css is compiled. My guess is that there's something in your environment that's causing postcss to fail. Maybe webpack is installed globally? or postcss? |
Beta Was this translation helpful? Give feedback.
-
Same issue here with vercel, works fine with building and running locally but not on vercel lol |
Beta Was this translation helpful? Give feedback.
-
Same problem... my package.json:
my postcss.config,js:
tailwindconfig:
|
Beta Was this translation helpful? Give feedback.
-
also have this issue. Interestingly:
but the one on vercel is really small and starts with this and doesn't load all the base tailwind classnames:
so i guess something is wrong with postcss because these
are not turning into what they should be turning into |
Beta Was this translation helpful? Give feedback.
-
hmm fixed it - in my main app/layout.tsx file i was importing it like this:
I moved it to ./styles/globals.css and added a path for it in tsconfig
Weird how it worked locally (even with local build) but not on vercel. Not sure why this fixed it either |
Beta Was this translation helpful? Give feedback.
-
I've also met similar issue and non of the answers above worked out.
The issue was that I didn't add any matchers to the middleware that should bypass redirection.
should solve the issue.
file, it was redirected inside my middleware function. Hope this helps |
Beta Was this translation helpful? Give feedback.
-
the css was not loading for me either in prod |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I finally migrated my app to the Next JS 13 App directory. The styles on the local machine work in both dev and prod. But when checking on my demo Linux VPS server, I get globals.css file not compiled. It feels like postcss is not working at all.
I have been trying to start this for over 2 hours, has anyone experienced this problem ?
My search led me to this discussion https://github.com/vercel/next.js/discussions/48156, but all tailwind configs copied.
Here resulting CSS on dev or prod mode.

Additional information
Example
Just default tailwind css setup
Beta Was this translation helpful? Give feedback.
All reactions