You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Leave Next 13.5.11 for 16.3.2 (npm latest, Active LTS). Stay on the pages router and React 18.2. Clear the two npm audit highs (next and bundled postcss) that #18 deliberately left.
This is the #17 follow-up. That issue parked a 14.2.x hop; that landing is now EOL (14 security support ended Oct 2025; 15 maintenance ends Oct 2026). 16.3.2 is the only line with a year of support left (~Oct 2027). Pages Router is still supported in 16; it is frozen for new APIs. Next 16.3.2 still peers react@^18.2 — Pages Router uses the React in package.json, so 19 is not required.
Do notnpm audit fix --force. That dumps 16.x into the lockfile and skips the config/lint/pin work below.
Bump next and eslint-config-next to 16.3.2. Leave react / react-dom at 18.2.0.
Drop the exact pins on @next/env and @swc/helpers — they must follow next (16.3.2 ships @swc/helpers@0.5.23; we pin 0.5.2). Keep the minimatch@9 override unless the new tree makes it redundant.
next.config.js: delete swcMinify: true (default, then removed). Re-check transpilePackages: ['geist'] — written for a 13.5 font-loader hole; keep it if the pages-router “collecting page data” step still needs it, drop it if the build is clean without it. Leave reactStrictMode: true.
Replace next lint (removed in 16). package.json"lint" becomes eslint . (or equivalent). next build no longer lints.
Node 20.9+ is the floor. Confirm local + Vercel.
Turbopack is now next dev / next build. No custom webpack here, so it should just run. If geist or CSS import order breaks, next build --webpack is the fallback — not an API rewrite.
README Stack / Checks: 13.5.11 → 16.3.2, lint command, Node floor, geist note if it changed.
Gates
package.json / lockfile / next.config.js / lint script / README only, unless a listed fallback forces a one-line webpack opt-out.
npm run lint, npm test (188), npm run build — exit-code checked.
npm audit after: report what remains. Never --force.
No app-code changes unless a gate fails and the fix is a config flag (e.g. --webpack).
Kill criterion
If the NDJSON stream buffers, drops n: 3 deltas, or swallows req close under Turbopack, stop. Fall back to next build --webpack / next dev --webpack in this PR. Do not rewrite the route. If webpack also fails the stream, park and report — that is a different issue.
Goal
Leave Next 13.5.11 for 16.3.2 (npm
latest, Active LTS). Stay on the pages router and React 18.2. Clear the twonpm audithighs (nextand bundledpostcss) that #18 deliberately left.This is the #17 follow-up. That issue parked a 14.2.x hop; that landing is now EOL (14 security support ended Oct 2025; 15 maintenance ends Oct 2026). 16.3.2 is the only line with a year of support left (~Oct 2027). Pages Router is still supported in 16; it is frozen for new APIs. Next 16.3.2 still peers
react@^18.2— Pages Router uses the React inpackage.json, so 19 is not required.Do not
npm audit fix --force. That dumps 16.x into the lockfile and skips the config/lint/pin work below.Related: #17 (closed, remaining highs), #41 finding 1 (this issue owns that finding).
Out of scope
pages/→app/). Separate product decision, not a prerequisite.pages/api/chat.jsas a Route Handler. Nodereq/resNDJSON stays. Edge / AI Gateway still drop logprobs.cacheComponents, Instant Navigations.Plan
nextandeslint-config-nextto 16.3.2. Leavereact/react-domat 18.2.0.@next/envand@swc/helpers— they must follownext(16.3.2 ships@swc/helpers@0.5.23; we pin0.5.2). Keep theminimatch@9override unless the new tree makes it redundant.next.config.js: deleteswcMinify: true(default, then removed). Re-checktranspilePackages: ['geist']— written for a 13.5 font-loader hole; keep it if the pages-router “collecting page data” step still needs it, drop it if the build is clean without it. LeavereactStrictMode: true.next lint(removed in 16).package.json"lint"becomeseslint .(or equivalent).next buildno longer lints.next dev/next build. No custom webpack here, so it should just run. If geist or CSS import order breaks,next build --webpackis the fallback — not an API rewrite.Gates
package.json/ lockfile /next.config.js/ lint script / README only, unless a listed fallback forces a one-line webpack opt-out.npm run lint,npm test(188),npm run build— exit-code checked.npm auditafter: report what remains. Never--force.logprobs/top_logprobs/n: 3#lg-refractin_documentInvariants
pages/_app.js,pages/_document.js,pages/index.js,pages/api/chat.jsstay where they are./api/chat. Not Edge, not the Vercel AI Gateway — those paths drop logprobs.logprobs,top_logprobs: 5,n: 3, NDJSON stream (res.writeHead/flushHeaders/req.on('close')) unchanged.maxDuration: 60stays.--webpack).Kill criterion
If the NDJSON stream buffers, drops
n: 3deltas, or swallowsreqclose under Turbopack, stop. Fall back tonext build --webpack/next dev --webpackin this PR. Do not rewrite the route. If webpack also fails the stream, park and report — that is a different issue.