Well, I'm using Next js 13 to develop a website, but for some reason I'm having this warning in console
The resource http://localhost:3000/_next/static/chunks/polyfills.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally.
I've tried to remove Links and see if any Image file it's giving problems but any of this helped.
The problem is with the
import { Inter } from 'next/font/google'
Changed this from :
import './globals.css'
import { Inter } from 'next/font/google'
const inter = Inter({ subsets: ['latin'] })
export const metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
}
export default function RootLayout({ children }: { children: React.ReactNode}) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
</html>
)
}
to :
import './globals.css'
export const metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
}
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body >
{children}
</body>
</html>
)
}
The problem is gone for now! I think in development mode, nextjs preloads css for speedy development and while hot reloading and it does that preloading continuously after every change! Hope to see this problem fixed soon by vercel
I got the same warnings on the repo linked below. Not using anything special but it seems like its something that's getting polyfilled when using the experimental appDir. So don't worry to much about it since I'm sure it will be fixed in the near future!
https://github.com/ShiftCodeEU/shiftcode.eu
Edit: This issue is fixed in one of the more recent canary releases. So if you dont want to deal with this error at the moment you could use canary already or wait for the first coming stable release.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With