TS71002

"fontSans" is not a valid Next.js entry export value.

Broken Code ❌

import type { Metadata } from 'next';
import { Inter as FontSans } from 'next/font/google';
 
export const fontSans = FontSans({
  subsets: ['latin'],
  variable: '--font-sans',
});

Fixed Code ✔️

If you don't need the constant in another file, simply remove it's export statement:

import type { Metadata } from 'next';
import { Inter as FontSans } from 'next/font/google';
 
const fontSans = FontSans({
  subsets: ['latin'],
  variable: '--font-sans',
});