-
-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
global variable next
does not exist in storybook
#464
Comments
Facing this as well -> true in test environments. I recommend you update your types to make nuqs/packages/nuqs/src/update-queue.ts Line 122 in f9c89d3
|
Thanks, I had fixed it in a previous place but this one slipped through. Types updated, marked as optional, and release baking in the oven. |
🎉 This issue has been resolved in version 1.15.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Context
What's your version of
nuqs
?"nuqs": "^1.15.3",
[email protected]
Are you using:
basePath
option in your Next.js configwindowHistorySupport
flag in your Next.js configDescription
While running storybook
useQueryState
has a linewindow.next.version !== '14.0.3'
-> which assumes that there is a globalnext
variable inside storybook. But it doesn't exist.I think it'd be better to add something like
window.next?.version
just to make it work by defaultReproduction
Steps to reproduce the behavior:
import { useQueryState } from 'nuqs';
and it will fail to renderThe text was updated successfully, but these errors were encountered: