Running application in `dev` mode is unstyled but in production it works.
Answered
EatCodeGame posted this in #help-forum
Packages:
- "next": "^15.3.4"
- "next-themes": "^0.4.6"
- "@tailwindcss/postcss": "^4.1.10"
- "postcss": "^8"
- "tailwindcss": "^4.1.10"
- "tw-animate-css": "^1.3.4",
Issue:
When running NextJS in
Has anyone else ran into this issue and what did you do to resolve it?
Thank you for your time.
James (EatCodeGame)
- "next": "^15.3.4"
- "next-themes": "^0.4.6"
- "@tailwindcss/postcss": "^4.1.10"
- "postcss": "^8"
- "tailwindcss": "^4.1.10"
- "tw-animate-css": "^1.3.4",
Issue:
When running NextJS in
dev
mode all of my pages are showing up unstyled, but when I run build
and then start
they are styled correctly. Also when pushed to production everything is styled correctly. I been trying to resolve this issue for over a week now and can't seem to make any progress.Has anyone else ran into this issue and what did you do to resolve it?
Thank you for your time.
James (EatCodeGame)
Answered by EatCodeGame
I resolved the issue by recreating:
-
-
-
-
And that seemed to of fixed it.
-
components.json
-
next.config.js
-
postcss.config.mjs
-
tsconfig.json
And that seemed to of fixed it.
4 Replies
@EatCodeGame Packages:
- "next": "^15.3.4"
- "next-themes": "^0.4.6"
- "@tailwindcss/postcss": "^4.1.10"
- "postcss": "^8"
- "tailwindcss": "^4.1.10"
- "tw-animate-css": "^1.3.4",
Issue:
When running NextJS in `dev` mode all of my pages are showing up unstyled, but when I run `build` and then `start` they are styled correctly. Also when pushed to production everything is styled correctly. I been trying to resolve this issue for over a week now and can't seem to make any progress.
Has anyone else ran into this issue and what did you do to resolve it?
Thank you for your time.
James (EatCodeGame)
What output mode you have on? Also, are you using turbo on
dev
script?@strikx I am using Turbo, my config looks like the following:
const nextConfig = {
turbopack: {
resolveExtensions: [".mdx", ".tsx", ".ts", ".jsx", ".js", ".json"],
},
eslint: { ignoreDuringBuilds: true },
typescript: { ignoreBuildErrors: true },
images: { unoptimized: true },
};
I resolved the issue by recreating:
-
-
-
-
And that seemed to of fixed it.
-
components.json
-
next.config.js
-
postcss.config.mjs
-
tsconfig.json
And that seemed to of fixed it.
Answer
Chum salmon
I've seen quite a few ppl here having problems because they have Turbo mode. 🤦