Next.js Discord

Discord Forum

My font stopped applying

Answered
Jersey Wooly posted this in #help-forum
Open in Discord
Jersey WoolyOP
Hello. Anybody knows why mi poppins font is not applying?
// layout.tsx
import { poppins } from "@/app/ui/fonts";
// ....

<html lang="en">
      <body className={poppins.className}>
        <header className='flex justify-center'>
            <Navbar></Navbar>
        </header>
        {children}
      <ToastContainer position="bottom-right" transition={Slide} autoClose={3000}/>
      </body>
    </html>

// ui/fonts
import {Poppins } from 'next/font/google';

export const poppins = Poppins({
    weight: ['400', '500', '600', '700'],
    subsets: ['latin'],
})


It was working fine, until the app suddenly stopped using the font.
Answered by American black bear
@linesofcode thanks, that worked for me.
View full answer

7 Replies

American black bear
@Jersey Wooly Did you figure this out?
did you update nextjs recently?
remove your .next folder
(maybe node modules too, just to be safe)
reinstall packages
and then try again
American black bear
@linesofcode thanks, that worked for me.
Answer