Next.js Discord

Discord Forum

Vercel Error

Answered
American black bear posted this in #help-forum
Open in Discord
American black bearOP
Failed to compile.
lib/fonts.ts
next/font error:
Failed to fetch JetBrains Mono from Google Fonts.
Build failed because of webpack errors
Error: Command "npm run build" exited with 1




My code looks like:


import { JetBrains_Mono as FontMono, Inter as FontSans } from "next/font/google"

export const fontSans = FontSans({
  subsets: ["latin"],
  variable: "--font-sans",
})

export const fontMono = FontMono({
  subsets: ["latin"],
  variable: "--font-mono",
})
'



How can i fix this ?
Answered by chisto
are you using node 14 for any chance? that happened to me once and i had to upgrade to node 16 and remove .next folder
View full answer

2 Replies

are you using node 14 for any chance? that happened to me once and i had to upgrade to node 16 and remove .next folder
Answer
@chisto are you using node 14 for any chance? that happened to me once and i had to upgrade to node 16 and remove .next folder
American black bearOP
Yes alredy fixed by removing the .next folder