Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module not found: Can't resolve '***\app\favicon.ico?__next_metadata__' #70172

Closed
Sir-Erwin opened this issue Sep 17, 2024 · 7 comments
Closed
Labels
bug Issue was opened via the bug report template. create-next-app Related to our CLI tool for quickly starting a new Next.js application. Image (next/image) Related to Next.js Image Optimization. Metadata Related to Next.js' Metadata API.

Comments

@Sir-Erwin
Copy link

Link to the code that reproduces this issue

https://github.com/Sir-Erwin/project-xenia.git

To Reproduce

  1. npm run dev

(after compiling it starts to throw the following error)

Current vs. Expected behavior

I expected to see the code successfully seeing that I had made no modifications from what I got from npx create-next-app@latest.

However, it threw an error saying " Module not found: Can't resolve '***\project-xenia\app\favicon.ico?next_metadata' "

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Home
  Available memory (MB): 12085
  Available CPU cores: 8
Binaries:
  Node: 20.11.1
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.11 // Latest available version is detected (14.2.11).
  eslint-config-next: N/A
  react: 18.3.1
  react-dom: 18.3.1
  typescript: N/A
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

create-next-app, Image (next/image), Metadata

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

I even tested it out with the previous 14.x.x versions, and even a 13.5.x version but it's throwing the same error.

I tried removing favicon.ico, but it just throws more errors. And sometimes it doesn't even start compiling, or freezes when compiling. I need to kill the processes eventually.

When I tried reproducing this in sandbox tho, there didn't seem to be a problem.

My guess, it has something to do with Windows, like its paths and stuff...

@Sir-Erwin Sir-Erwin added the bug Issue was opened via the bug report template. label Sep 17, 2024
@github-actions github-actions bot added create-next-app Related to our CLI tool for quickly starting a new Next.js application. Image (next/image) Related to Next.js Image Optimization. Metadata Related to Next.js' Metadata API. labels Sep 17, 2024
@Sir-Erwin
Copy link
Author

When I delete favicon.ico, I get the following error

Module not found: Can't resolve 'next/font/local/target.css?{"path":"app\layout.tsx","import":"","arguments":[{"src":"./fonts/GeistVF.woff","variable":"--font-geist-sans","weight":"100 900"}],"variableName":"geistSans"}

@samcx
Copy link
Member

samcx commented Sep 17, 2024

@Sir-Erwin Can you try the latest canary to see if you're experiencing with that as well?

Will have to install the release candidate of react and react-dom as well.

@Sir-Erwin
Copy link
Author

Same response

image

@samcx
Copy link
Member

samcx commented Sep 18, 2024

@Sir-Erwin Just to confirm, this is with the :repro: as well? I'm surprised it's taking 15.5s to compile :wow:.

Also, which package manager are you using (since next info is showing N/A is showing empty for all of them)?

@Sir-Erwin
Copy link
Author

Wait, what's repro...

I don't know, I just used "npx create-next-app@latest"

I had downloaded node and react about 6 months ago, but they seem to be up to date...

@samcx
Copy link
Member

samcx commented Sep 19, 2024

@Sir-Erwin Can you share with us what was above your screenshot (your entire terminal process from starting the next dev Development server)?

@Sir-Erwin
Copy link
Author

image

image

image

@vercel vercel locked and limited conversation to collaborators Sep 20, 2024
@samcx samcx converted this issue into discussion #70297 Sep 20, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Issue was opened via the bug report template. create-next-app Related to our CLI tool for quickly starting a new Next.js application. Image (next/image) Related to Next.js Image Optimization. Metadata Related to Next.js' Metadata API.
Projects
None yet
Development

No branches or pull requests

2 participants