ironforge-cloud / soldev-ui-old

SolDev UI

Home Page:https://soldev.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: No router instance found

cdhiraj40 opened this issue · comments

Describe the bug:

Whenever I build the project NextJS throws an error showing "No router instance found". It's not a production problem* but a possible reason could be that during the build NextJS might have tried to access a router method like push which is not supported on the server side hence the error.

*I did not find this error on production.

Steps to reproduce the behavior:

  1. Build the project.
  2. See the error.

Expected behavior:

Well, it should not show the error 🤷🏽

Screenshots:

image

Additional context:

I think a possible solution would be to use the useRouter hook rather than accessing the router object directly.
Read more about it here.