Fonts not loading on localhost, but it will in production?

So my fonts are not loading on localhost for some reason? I have no idea why this is happening, and it just started. This is how i import the fonts:
//fonts.ts

import { Inter, Rubik_Mono_One } from 'next/font/google'

export const inter = Inter({
subsets: ['latin'],
display: 'swap',
})

export const rubik_mono_one = Rubik_Mono_One({
subsets: ['latin'],
display: 'swap',
weight: "400",
})
//fonts.ts

import { Inter, Rubik_Mono_One } from 'next/font/google'

export const inter = Inter({
subsets: ['latin'],
display: 'swap',
})

export const rubik_mono_one = Rubik_Mono_One({
subsets: ['latin'],
display: 'swap',
weight: "400",
})
This is how I use them:
import { rubik_mono_one } from "@/app/fonts";

const Navbar: React.FC = () => {

return (
<div className="flex flex-row justify-between headline-color items-center px-[5%] py-7 font-bold text-base">
<Link href="/" className="flex flex-row justify-center items-center gap-3">
<p className={`${rubik_mono_one.className} text-lg`}>App</p>
</Link>
import { rubik_mono_one } from "@/app/fonts";

const Navbar: React.FC = () => {

return (
<div className="flex flex-row justify-between headline-color items-center px-[5%] py-7 font-bold text-base">
<Link href="/" className="flex flex-row justify-center items-center gap-3">
<p className={`${rubik_mono_one.className} text-lg`}>App</p>
</Link>
Solution:
Really weird, but fixed it by deleting the .next folder. Might have been an issue with the cache, don't really know.
Jump to solution
4 Replies
Icestonks
IcestonksOP10mo ago
I'm using Next.js 14.0.4
Icestonks
IcestonksOP10mo ago
It seems to be putting in the classname, but the class iteself dosen't exist
No description
Icestonks
IcestonksOP10mo ago
This is what it looks like in the production, and also what it should be like in local.
No description
Solution
Icestonks
Icestonks10mo ago
Really weird, but fixed it by deleting the .next folder. Might have been an issue with the cache, don't really know.
Want results from more Discord servers?
Add your server