#CSS Randomly not Loading on Build
40 messages · Page 1 of 1 (latest)
🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord
🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize
✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)
And I'm aware of the Error 423 and 418, but I get them on /dashboard which doesn't have this refresh no css type of error.
Inspect the elements, see if tailwind css bundle is getting loaded
How do I check that?
In the browser
okay, let me take a look
What should I be looking for?
This is the dashboard page (the one that's working fine), if that helps
Thanks, let me do that
your tailwindcss is not getting build
yeah on the dashboard page its working fine hahaa
can you show me tailwind config?
and also your directory structure (screenshot of vscode)
ofc
import type { Config } from "tailwindcss"
const config = {
darkMode: ["class"],
content: [
'./pages/**/*.{ts,tsx}',
'./components/**/*.{ts,tsx}',
'./app/**/*.{ts,tsx}',
'./src/**/*.{ts,tsx}',
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
"./components/**/*.{js,ts,jsx,tsx,mdx}",
"./app/**/*.{js,ts,jsx,tsx,mdx}",
],
prefix: "",
theme: {
container: {
center: true,
padding: "2rem",
screens: {
"2xl": "1400px",
},
},
extend: {
fontFamily: {
sans: ["var(--font-sans)"],
},
colors: {
border: "hsl(var(--border))",
input: "hsl(var(--input))",
ring: "hsl(var(--ring))",
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",
primary: {
DEFAULT: "hsl(var(--primary))",
foreground: "hsl(var(--primary-foreground))",
},
secondary: {
DEFAULT: "hsl(var(--secondary))",
foreground: "hsl(var(--secondary-foreground))",
},
destructive: {
DEFAULT: "hsl(var(--destructive))",
foreground: "hsl(var(--destructive-foreground))",
},
muted: {
DEFAULT: "hsl(var(--muted))",
foreground: "hsl(var(--muted-foreground))",
},
accent: {
DEFAULT: "hsl(var(--accent))",
foreground: "hsl(var(--accent-foreground))",
},
popover: {
DEFAULT: "hsl(var(--popover))",
foreground: "hsl(var(--popover-foreground))",
},
card: {
DEFAULT: "hsl(var(--card))",
foreground: "hsl(var(--card-foreground))",
},
},
borderRadius: {
lg: "var(--radius)",
md: "calc(var(--radius) - 2px)",
sm: "calc(var(--radius) - 4px)",
},
keyframes: {
"accordion-down": {
from: { height: "0" },
to: { height: "var(--radix-accordion-content-height)" },
},
"accordion-up": {
from: { height: "var(--radix-accordion-content-height)" },
to: { height: "0" },
},
},
animation: {
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
},
},
},
plugins: [require("tailwindcss-animate")],
} satisfies Config
export default config
Directory structure is here https://github.com/skzhengkai/hyunGPT-Dashboard-Shadcn
this one also
content: [
'./pages/**/*.{ts,tsx}',
'./components/**/*.{ts,tsx}',
'./app/**/*.{ts,tsx}',
'./src/**/*.{ts,tsx}',
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
"./components/**/*.{js,ts,jsx,tsx,mdx}",
"./app/**/*.{js,ts,jsx,tsx,mdx}",
],
this is overtaken
app and components should be enough?
good point, should I try
content: [
'./app/**/*.{js,ts,jsx,tsx,mdx}",
"./components/**/*.{js,ts,jsx,tsx,mdx}",
],
I'm going to try
content: [
'./components/**/*.{ts,tsx}',
'./app/**/*.{ts,tsx}',
],
and let you know if it works
I tried the above and it still has the same error
@winter vector I think the problem was the actual code of the servers file, because when I replaced it with an older version, it worked fine.
The version I replaced it with: https://github.com/skzhengkai/hyunGPT-Dashboard-Shadcn/commit/bca75caeb46faa92e03ff7ccf02888c0e7d9a42e#diff-817bc2b6ba58137c5165ef216552fee180e719e023cffc70f45958b4778a7b34
add: dummy server settings api route
add: premium pages
add: bot settings page for server
modify: server side navbar to have better formatting and better tabs
modify: profile page to look much bet...
Apparently the reason was because of the [server_id] part - removing it fixed it. not sure why
The issue was fixed by duplicating the globals.css into the /servers folder and referencing that instead of the original globals.css file.
Seems like there has been an underlying bug with dynamic routes in next.js for a while: