Next.js Discord

Discord Forum

Nextjs 14.0.4 npm run dev shows module not found '.../favicon.ico?__next_metadata__' everytime

Answered
Juniper Titmouse posted this in #help-forum
Open in Discord
Juniper TitmouseOP
Every time I try to create a Next.js project with npx create-next-app@latest, and run it with npm run dev, I'm getting this module not found error. I can't find any file which the error is trying to point to! Using Nodejs 20.10.0.

I tried with and without ESLint. With and without Typescript. And so on. But none resolved my issue.

I searched online and found some suggestions, such as, deleting .next folder, deleting node-modules, deleting npm cache. None of those helped!
Answered by Toyger
you have symbol # in your myprojects folder name, it can be significant problem for path resolving in nextjs
either remove symbol from folder name, or move your nextjs project to folder where it don't have any special symbols in path.
View full answer

5 Replies

Toyger
you have symbol # in your myprojects folder name, it can be significant problem for path resolving in nextjs
either remove symbol from folder name, or move your nextjs project to folder where it don't have any special symbols in path.
Answer
Juniper TitmouseOP
It worked! I removed the '#' symbol from the folder name.
@Juniper Titmouse How did you figure it out?
Toyger
from error, it can't find modules that should be in place, then something wrong with path, then I checked path and noticed special symbol that can cause problems.