Next.js Discord

Discord Forum

Unknown error in dev mode

Answered
Japanese Bobtail posted this in #help-forum
Open in Discord
Avatar
Japanese BobtailOP
[Error: UNKNOWN: unknown error, open 'G:\Projects\Web-Development\college\employee-management\client\.next\static\chunks\app\page.js'] {
  errno: -4094,
  code: 'UNKNOWN',
  syscall: 'open',
  path: 'G:\\Projects\\Web-Development\\college\\employee-management\\client\\.next\\static\\chunks\\app\\page.js'
}


I get this error everytime I use dev mode. I don't know how to fix it. Somtimes it workes perfectly on a different machine but not mine.
Answered by James4u
you can say it's a bug but as it's not production build - while running your project on your local - those errors come from any of your chunk js - which gets updated everytime you update your codebase meaning it's a bit understandable
View full answer

41 Replies

Avatar
@Japanese Bobtail If you re-run your project, it should be gone away I think
Avatar
Japanese BobtailOP
sometimes, but not everytime
Avatar
what do you mean by everytime?
you get this error everytime you visit a certain page?
Avatar
Japanese BobtailOP
no
sometimes this error won't go away for hours
even the components are completely correct
Avatar
yeah, when you encounter this error, simply rerun your project
Avatar
Japanese BobtailOP
is this a next bug
Avatar
you can say it's a bug but as it's not production build - while running your project on your local - those errors come from any of your chunk js - which gets updated everytime you update your codebase meaning it's a bit understandable
Answer
Avatar
simply re-run your project, that's all
it won't happen in the production build
Avatar
Japanese BobtailOP
I don't really need the current project for production
it's just for a college project
Avatar
by production, I meant npm run build & npm run start
Avatar
Japanese BobtailOP
yes, I am aware
Avatar
what's the reason you think you don't need produciton build but just npm run dev???
Avatar
Japanese BobtailOP
I just want to work on it fast, I don't have to give a preview
some ss are enough ig
Avatar
yeah, work on dev mode
everyone works in dev mode when they code
lol
Avatar
Japanese BobtailOP
yeah, that's what I said lol
Avatar
I just meant you won't get those errors when you host your website
with production build
okie
I hosted a client website a few months back
it's working great
they love it
Avatar
yeah, so if you encounter the error while developing, just restart the server
that's all
and @Japanese Bobtail mark solution if you don't have any questions and if it helped you!
Avatar
Japanese BobtailOP
ok
fkk
same error
just restarted
Avatar
remove .dist and restart - give it a try!
Avatar
Japanese BobtailOP
I just remove entire .next lol
Avatar
oh yeah, I meant build output folder
Avatar
Japanese BobtailOP
man the errors are getting really frequent