`next/font/google` periodically stops working
Answered
piscopancer posted this in #help-forum
who knows why this happens? I could code yesterday and the were loaded nicely, today's morning they no longer get loaded and nextjs errs.
import { Dela_Gothic_One, JetBrains_Mono, Wix_Madefor_Text } from 'next/font/google'
const _wix = Wix_Madefor_Text({ subsets: ['latin', 'cyrillic'], variable: '--font-sans', display: 'swap' })
const _dela = Dela_Gothic_One({ subsets: ['latin', 'cyrillic'], weight: ['400'], variable: '--font-display', display: 'swap' })
const _jetbrainsMono = JetBrains_Mono({ subsets: ['cyrillic', 'latin'], variable: '--font-mono', display: 'swap' })
export const fontVars = `${_wix.variable} ${_dela.variable} ${_jetbrainsMono.variable}`
Answered by piscopancer
this answer helped https://github.com/vercel/next.js/discussions/47741#discussioncomment-5593265
It happened to me today as well, I was freaked out until I came across your response just now.
Had to remove the ".next" folder and "npm run dev" again.
1 Reply
this answer helped https://github.com/vercel/next.js/discussions/47741#discussioncomment-5593265
It happened to me today as well, I was freaked out until I came across your response just now.
Had to remove the ".next" folder and "npm run dev" again.
Answer