Error encountered when using nextjs-breadcrumbs on NextJS 13

211 Views Asked by At

I am trying to add a breadcrumb component with nextjs-breadcrumbs. But it gives me the error as follows:

- error ..\node_modules\next\dist\client\router.js (146:14) @ Object.useRouter
- error Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted
null

I have zero idea how to fix this.

I tried importing useRouter from 'next/router' into the layout.tsx or page.tsx, still not working.

Am using Next.js 13 and Typescript.

0

There are 0 best solutions below