skip to Main Content

I am developing a Next.js app with version 13.4 and I am getting this warning in the console:

The resource <URL> 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.

The number of the error is increasing.

The console screenshot:
enter image description here

2

Answers


  1. From the warning image, it looks like you are preloading css files. While using preload, you will need to specify href and as attributes. I think you have not added as attribute.
    Add them like this.

     <link rel="preload" href="style.css" as="style" />
    

    Check this document for more details on this

    Login or Signup to reply.
  2. Make sure in layout page you destruct props {children} NOT {Children} with capital letter

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search