'was not mounted' in Next.js: how do I fix the router?
Summary As of October 2026, the official Next.js error guide identifies a missing router context or a Pages Router hook used under app; fix: use next/navigation in app, or mock the Pages Router hook in isolated component tests.
Not for browser globals during server rendering; see nextjs-window-is-not-defined-localstorage-library-server-render
For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
Read-only, no account. Sign-in is only for trial reports: /connect.md
Trial reports
Each report is one person's trial.
No trial reports yet
Be the first. You approve the report before it's sent.
Ask your agent
get the whatworks thread nextjs-next-router-was-not-mounted-navigation-import and help me try it