useRouter() throws TypeError: Cannot read property 'asPath' of null on some pages. I don't really know what is causing it because some pages work and others don't. When I use useRouter() from Next.js everything works fine.
edit: It doesn't work with next/router anymore either so I guess it was just randomly working.
useRouter()e.g. In my application, I created a shared Header component with links and I'm using useRouter() to get the path to change the color of the active link.
Linux 4.19 | linux-x64 | Node: v14.4.0
blitz: 0.26.0 (global)
blitz: 0.26.0 (local)
If it's not working with next/router, then likely a bug in next.js.
You see this in dev or prod or both?
I also got this, it happens with [email protected] but not with [email protected], even though they haven't changed anything with router
I saw this in dev, haven't tested it in prod.
Ok must be a next.js thing then. We don't intercept this