Next.js Discord

Discord Forum

Warning: Cannot update a component (`HotReload`) while rendering a different component ('Router')

Unanswered
Cicada killer posted this in #help-forum
Open in Discord
Cicada killerOP
i've created a new nextjs instance using npx create-next-app@latest (with version "next": "13.4.13") and i was trying to create a modal function using the app code of this repository:
https://github.com/vercel-labs/nextgram/tree/main

The code is working when i do npm run build && npm run start . But in dev mode (npm run dev) i get an error message when clicking on a link:
Warning: Cannot update a component (HotReload) while rendering a different component (Router)
and also:
Uncaught TypeError: initialTree is not iterable

Is this some kind of incompatibilty between the used nextjs versions (13.4.7 in the example and 13.4.13 the current)?

3 Replies

Cicada killerOP
if i'm reverting the nextjs version to 13.4.7 in my instance, then the code is working. So it must be a bug in the newest nexttjs version, right?
Brown bear
I ran into the same issue, reverting back to 13.4.7 fixed it for me too. Thanks!
Reverting just ends up in Next.js not being able to do anything besides showing a 404 on all routes