Summary
Upgrade from Next.js 15.5.14 to 16.2.4, and next-intl from 4.1.0 to 4.9.1. This resolves an intermittent Cannot read properties of undefined (reading 'payload') console error during page loads caused by a known RSC flight data issue in Next.js 15.x.
Changes Required
middleware.ts → proxy.ts: Next.js 16 renames middleware to proxy with a named export
revalidateTag() signature: Now requires a second argument (cache lifetime profile)
- ESLint flat config:
next lint command removed; migrate to eslint.config.mjs with ESLint CLI
- Dependency bumps: next, next-intl, react, react-dom, eslint-config-next, @types/react, @types/react-dom
Lint Fixes (pre-existing)
The stricter React 19.2 and TypeScript ESLint rules surfaced several pre-existing issues:
react-hooks/refs: Reading refs during render in 3 modal components → converted to state
react-hooks/set-state-in-effect: Unnecessary setState calls in effects → derived values / lazy initializers
react-hooks/purity: Impure Math.random in render → lazy useState initializer
@typescript-eslint/no-explicit-any: as any locale casts → as readonly string[]
@next/next/no-img-element: <img> for logo → next/image
Testing
Summary
Upgrade from Next.js 15.5.14 to 16.2.4, and next-intl from 4.1.0 to 4.9.1. This resolves an intermittent
Cannot read properties of undefined (reading 'payload')console error during page loads caused by a known RSC flight data issue in Next.js 15.x.Changes Required
middleware.ts→proxy.ts: Next.js 16 renames middleware to proxy with a named exportrevalidateTag()signature: Now requires a second argument (cache lifetime profile)next lintcommand removed; migrate toeslint.config.mjswith ESLint CLILint Fixes (pre-existing)
The stricter React 19.2 and TypeScript ESLint rules surfaced several pre-existing issues:
react-hooks/refs: Reading refs during render in 3 modal components → converted to statereact-hooks/set-state-in-effect: Unnecessary setState calls in effects → derived values / lazy initializersreact-hooks/purity: ImpureMath.randomin render → lazyuseStateinitializer@typescript-eslint/no-explicit-any:as anylocale casts →as readonly string[]@next/next/no-img-element:<img>for logo →next/imageTesting
npm run buildpassesnpm run lintpasses clean (0 errors, 0 warnings)npm run devstarts successfully on Next.js 16.2.4 (Turbopack)