Next.js Discord

Discord Forum

How to debug the cause of a "hard reload" in NextJS dev mode?

Unanswered
Kaikadi posted this in #help-forum
Open in Discord
KaikadiOP
Hi! I was wondering if it's possible to turn on verbose logging for next dev to figure out why I am receiving "hard reloads" in dev mode? I call a nextjs api endpoint from my web page which causes the api route to show as compiling in my logs but once it compiles my web page also hard reloads making it pretty much impossible for local development.

I bet it has to do something with a local monorepo package import but I just cant trace it down without any additional logging like..."xxx.ts caused a hard reload" or similar.

Here's a video of this happening. I just call my api endpoing from Insomnia and it causes the same problem...

https://streamable.com/yvki57

0 Replies