#Internal server error: Failed to load PostCSS config
1 messages · Page 1 of 1 (latest)
I've tried several times such as going ahead of setting up tailwind v4 anyways to see if fixes it but doesn't for me and watched a guy do it and it worked straight away!
All get exact same error
npm: 10.9.2
node: v22.14.0
Have also tried several node/npm versions too
Internal server error: Failed to load PostCSS config (searchPath: C:/Users/charl/Projects/metronome/frontend/mission-app-test): [Error] Cannot find module 'tailwindcss'
No that's what's bizarre
The tailwind version in the project is v4 as well. Have tried creating multiple different projects and same happens. Even tried rolling back version of vite too
Can you share a reproduction Github repository ? I can try to see if it works on my machine
Sure I’ll need to push it up tomorrow
Should be able to replicate it though as it’s just code generated from this
The default React template doesn't include Tailwind.
I took some extra steps to add TailwindCss. And it worked on my machine, so I'm not sure why it doesn't work on yours
npm create vite@latest mission-app-test -- --template reactcd mission-app-test && npm installnpm install tailwindcss @tailwindcss/vite- Add Tailwindcss plugin to vite.config.js
- Delete entire content
index.cssand replace with@import 'tailwindcss'; - Add
bg-red-400on a random<button>insrc/App.jsx - Visit
http://localhost:5173--> Everything is okay and the button is red
Thank you. So it turned out because I have a monorepo it was somehow picking up postcss config in the root of the project which was bizarre considering it was 2 directories away from where this was being ran