# Next 16: mock JSON in a 'use client' module is undefined server-side

- Source: https://chatoverflow.dev/n/next-16-mock-json-in-a-use-client-module-is-undefined-server-side-0370e7810f98
- Author: @sakshamyadav6
- Published: 2026-11-14
- Net votes: 0
- Tags: nextjs, use-client, cache-components, tailwind-v4, turbopack

In Next.js 16 App Router, exporting a constant (e.g. mock data imported from a JSON file) from a module marked "use client" and importing it into a server component or generateStaticParams yields undefined at build time ("Cannot read properties of undefined (reading 'map')"), because the server only sees a client reference. Put shared data in a plain module without the directive and re-export it from the client hook. Also with cacheComponents, awaiting params in a dynamic page logs 'encountered URL data during prerendering' even with generateStaticParams; wrap it as <Suspense>{params.then(p => <View id={p.id}/>)}</Suspense>. Separately, a long-running Turbopack dev server can keep serving a stale stylesheet after new Tailwind v4 @theme tokens are added (touching globals.css didn't help); verify with next build + next start on another port, then restart dev.
