Я продолжаю получать ошибку 404 при попытке импортировать шрифты Google в моем проекте NextJS: < /p>
⚠ [next]/internal/font/google/inter_5c8d1d76.module.css
Error while requesting resource
Received response with status 404 when requesting https://fonts.googleapis.com/css2?famil ... splay=swap
Import trace:
[next]/internal/font/google/inter_5c8d1d76.module.css
[next]/internal/font/google/inter_5c8d1d76.js
./app/layout.tsx
⚠ [next]/internal/font/google/inter_5c8d1d76.module.css
next/font: warning:
Failed to download `Inter` from Google Fonts. Using fallback font instead.
Import trace:
[next]/internal/font/google/inter_5c8d1d76.module.css
[next]/internal/font/google/inter_5c8d1d76.js
./app/layout.tsx
< /code>
Это мой файл mayout.tsx: < /p>
import type { Metadata } from "next";
import './globals.css';
import { Inter } from 'next/font/google'
const interFont = Inter({
subsets: ["latin"],
display: "swap",
weight: "400",
})
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
{children}
)
}
< /code>
Я попробовал следующее: < /p>
Удаление папки .next и повторное управление сервером < /li>
Обновление до последней версии.>
Подробнее здесь: https://stackoverflow.com/questions/797 ... -in-nextjs