The resource at “http....woff2” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly #45294
-
|
When I use in import { Ubuntu } from '@next/font/google';
const ubuntu = Ubuntu({ subsets: ['cyrillic', 'latin'], weight: '400' });
const ubuntuBold = Ubuntu({ subsets: ['cyrillic', 'latin'], weight: '700' });
function App() {
...some code
return (
<div className={s.content} style={{ color: theme.text }}>
<div className={clsx(s.content, isDefault ? ubuntuBold.className : ubuntu.className)}>
{!isDefault ? activeTab?.content : tabDefault}
</div>
</div>
)
}The resource at “http://localhost:3000/_next/static/media/f9e3f1f7478b5cbf.p.woff2” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly. localhost:3000
The resource at “http://localhost:3000/_next/static/media/e76854c588de135c.p.woff2” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly. localhost:3000
The resource at “http://localhost:3000/_next/static/media/0cf580864ae59341.p.woff2” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly. localhost:3000
The resource at “http://localhost:3000/_next/static/media/f884d4ea94220255.p.woff2” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly. localhost:3000
The resource at “http://localhost:3000/_next/static/media/d51be7479414f4fc.p.woff2” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly. localhost:3000
The resource at “http://localhost:3000/_next/static/media/e94cfb95acf534f2.p.woff2” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 9 replies
-
|
Did you ever manage to fix this? Currently facing the same issue... |
Beta Was this translation helpful? Give feedback.
-
|
I have the same issue, but only in the Firefox. |
Beta Was this translation helpful? Give feedback.
-
|
I had similar problem with fonts:
I just removed unused font declarations. Before: import { Inter, Roboto, Sora } from 'next/font/google'
export const inter = Inter({
subsets: ['latin'],
display: 'swap',
variable: '--font-inter'
})
export const roboto = Roboto({
subsets: ['latin'],
display: 'swap',
variable: '--font-roboto',
weight: '500'
})
export const sora = Sora({
subsets: ['latin'],
display: 'swap',
variable: '--font-sora'
})and after (I use only Inter font in my NextJS project): import { Inter } from 'next/font/google'
export const inter = Inter({
subsets: ['latin'],
display: 'swap',
variable: '--font-inter'
})It was acording to the official doccumentation (using multiple fonts in NextJS Vercel Project): |
Beta Was this translation helpful? Give feedback.
-
|
What worked for me is to remove the packaged "styled-jsx". I had styled-jsx installed as a separate package in my app. This created some conflict with next.js built-in styled-jsx. Deleting the package fixed it. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Import Only Used Fonts: Remove the Standalone "styled-jsx" Package: I hope this helps! |
Beta Was this translation helpful? Give feedback.
-
|
I'm just running into this as well. It indicates ALL my fonts are not used within a few seconds. But that's not actually true - one of them definitely is being used. I can see it, like with my eyes and everything. So why does it say it's not used? I suspect it's because the resource is not used, because the request, as the network tab revealed, is cached. But then, I wonder why these warnings are relevant for resources are are already in the cache 🤨 Or, I'm totally overshooting the cause here. |
Beta Was this translation helpful? Give feedback.

I had similar problem with fonts:
I just removed unused font declarations.
Before:
and after (I use only Inter font in my NextJS project):