generated from chiffre-io/template-library
-
-
Notifications
You must be signed in to change notification settings - Fork 254
Open
Description
Context
What's your version of nuqs?
What framework are you using?
- ✅ Next.js (app router)
- ❌ Next.js (pages router)
- ❌ React SPA (no router)
- ❌ Remix
- ❌ React Router
- ❌ Other
Which version of your framework are you using?
Additional environment:
node v25.6.0
macOS (arm64)Description
Importing nuqs/server on Node 25 emits this warning:
(node:XXXX) Warning: `--localstorage-file` was provided without a valid path
at Object.get (node:internal/webstorage:32:25)
In my app this appears during next dev (Turbopack) because server code imports nuqs/server for createSearchParamsCache.
From tracing, this happens at module evaluation time in nuqs debug code (isDebugEnabled) that probes localStorage.
Reproduction
Minimal Node-only repro (no Next required):
mkdir nuqs-node25-repro && cd nuqs-node25-repro
npm init -y
npm i [email protected]
NODE_OPTIONS=--trace-warnings node -e "import('nuqs/server').then(() => console.log('loaded'))"Observed output includes:
loaded
(node:...) Warning: `--localstorage-file` was provided without a valid path
at Object.get (node:internal/webstorage:32:25)
at isDebugEnabled (node_modules/nuqs/dist/server.js:...)
Expected:
- Importing
nuqs/serverin a server/runtime context should not touchlocalStorageat module top-level. - No Node webstorage warning should be emitted.
Potential direction:
- Gate debug-localStorage checks behind
typeof window !== 'undefined'(or defer the check to client-only paths).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels