Closed jhensley closed 1 week ago
I've seen other threads referencing an import specific for pages
routers (i.e. import { useQueryState } from 'nuqs/pages'
) -- seems like an ideal solution.
What's your Next.js version?
What's your Next.js version?
14.2.1
I was not able to get this error with a minimal reproduction repo (source here).
Could there be something else in your application setup causing this error?
Going to close this issue, feel free to reopen it with a link to a reproduction repository.
Context
What's your version of
nuqs
?"nuqs": "^1.17.4",
Next.js information (obtained by running
next info
):Are you using:
basePath
option in your Next.js configwindowHistorySupport
flag in your Next.js configDescription
When exclusively using
pages
router, Next throws an error due to AppRouterContext being null. See: https://github.com/vercel/next.js/blob/44bac5100d0ae6afef2925c3d88810c63eaf3eba/packages/next/src/client/components/navigation.ts#L117Reproduction
... Will work on it