Next.js Discord

Discord Forum

`npm run dev` doesn't work on me even a new latest NextJS project

Answered
Baldfaced hornet posted this in #help-forum
Open in Discord
Baldfaced hornetOP
why this keeps happening? all i did was just npx create-next-app@latest and npm run dev.

weird thing is, it worked first i did but after i immediately deleted the project folder and doing it again doesn't work anymore.
Answered by Baldfaced hornet
well i figured out i think. there was a special charactor in the project folder name. it works now thank y'all!
View full answer

17 Replies

remove .next and npm run dev again
if it doesnt work remove both .next and node_modules and npm install then npm run dev again
Baldfaced hornetOP
nope it still doesn't work
with the same error
does removing npm cache help?
npm cache clean next
Baldfaced hornetOP
uh did i something wrong or missed?
hmm then just purge the whole cache then
npm cache clean
Baldfaced hornetOP
yeah i've tried it with the force flag, even deleted the npm-cache folder manually but it still doesn't work.
is there a src/app/favicon.ico file in your project?
(although even if it's not there the error shouldnt be thrown)
Baldfaced hornetOP
this drives me crazy lmao
try reinstalling nodejs and npm? :'
Baldfaced hornetOP
well i figured out i think. there was a special charactor in the project folder name. it works now thank y'all!
Answer
Baldfaced hornetOP
kinda weird tho
well good luck to me, there isn't any special characters in the folder name in my case