Next.js Discord

Discord Forum

Module not found: Can't resolve 'C:\Users... \src\app\favicon.ico?__next_metadata__'

Answered
Chinese softshell turtle posted this in #help-forum
Open in Discord
Chinese softshell turtleOP
I'm scratching my head trying to figure out what is going on. This error appears when I create a page.tsx in the root of my app folder. I attached a image of how my src folder is structured.
This is the code on my page.tsx:
// `app/page.tsx` is the UI for the `/` URL
export default function Page() {
    return <h1>Hello, Home page!</h1>
  }

Super basic. My layout.tsx

import './globals.css'


export default function RootLayout({
    children,
  }: {
    children: React.ReactNode
  }) {
    return (
      <html lang="en">
        <body>{children}</body> 
      </html>
    )
  }

That's literally all the code. The css file is all commented out. I'm honestly thinking about just tossing this project and starting over again, since I haven't written anything.
I tried doing a search for 'favicon.ico?next_metadata ' or anything similar to it, but nothing.
Answered by joulev
quite a few people have faced this odd issue actually including me. I fixed it by simply restarting the dev server. Try removing .next and restart the dev server again
View full answer

2 Replies