1

i have tried out multiple options including reinstalling modules, changing next.config.js as follows

assetPrefix: process.env.NODE_ENV==='production'?"":"/"

and also i have tried hot reload not working

I also went through this closed issue on github,which suggested correctly naming file names, but in nextjs, the _app.js file is always booting up irrespective of the route, so i placed some component inside it to check for login authentication. the logic is that if i am logged in the index.js would come up or else other component that is present on the route. this way i could prevent private routes to be opened.

Also If I see the compiler logs i am able to see

compiling /_error(client and server)

which is not clear to me at all. How to be able to log the details with this error as i think this might one of the reason behind hmr not working.

Adarsh Raj
  • 297
  • 4
  • 14

0 Answers0