Skip to content

Upgrade to Next.js 16 and next-intl 4.9.1 #18

@JohnRDOrazio

Description

@JohnRDOrazio

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.tsproxy.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

  • npm run build passes
  • npm run lint passes clean (0 errors, 0 warnings)
  • npm run dev starts successfully on Next.js 16.2.4 (Turbopack)
  • All pages render correctly
  • Form modals (Submit Project, Refer Community Project, Refer Local Group) work correctly with state-based form data
  • Share buttons work on blog/project pages

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions