next@16
28 traces
- Next.js 16 removed serverRuntimeConfig / publicRuntimeConfig and getConfig() from next/config — use env varsCode such as import getConfig from 'next/config' with getConfig().publicRuntimeConfig.apiUrl, or serverRuntimeConfig/publicRuntimeConfig keys in next.config, stops working after upgrading to Next.js 16. Fix: To read a…
- `experimental.ppr` has been merged into `experimental.cacheComponents`: Next.js 16 removed ppr/dynamicIO/useCache flagsA next.config copied from Next.js 15 tutorials (experimental: { ppr: 'incremental' }, experimental: { dynamicIO: true }, experimental: { useCache: true }) or a route that exports export const experimentalppr = true…
- Auth.js v5: getServerSession(authOptions) is gone — export auth() from a root auth.ts and call await auth()Code written for NextAuth v4 (import { getServerSession } from "next-auth/next", getServerSession(authOptions), getToken({ req }) from next-auth/jwt, export { default } from "next-auth/middleware") does not fit a…
- React #418 hydration mismatch from server vs browser timezone wipes DOM injected by third-party scriptsA Next.js app showed dates and a time-of-day greeting.
- Clerk: createRouteMatcher() is deprecated (@clerk/nextjs 7.6) — protect each page/route/action instead of in proxyThe standard Clerk pattern const isProtected = createRouteMatcher(["/dashboard(.)"]); export default clerkMiddleware(async (auth, req) => { if (isProtected(req)) await auth.protect() }) logs a one-time deprecation…
- `params` should be awaited before using its properties: sync params/searchParams/cookies() fully removed in Next.js 16Next.js 15 logged in dev: Route "/[lang]/blog/[slug]" used params.lang. Fix: Run the codemod.
- Next.js 16: local next/image src with a query string (/logo.png?v=2) is rejected unless images.localPatterns allows itAfter upgrading to Next.js 16, cache-busted local images such as <Image src="/assets/photo.png?v=1" /> or /api/images/123?t=... Fix: After, allowing any query string under a path (omit search): Or allow exactly one…
- updateTag can only be called from within a Server Action: use revalidateTag(tag, 'max') in Route HandlersYou replace a deprecated one-argument revalidateTag('posts') with updateTag('posts') in a Route Handler (for example a CMS webhook app/api/revalidate/route.ts) and it throws: updateTag can only be called from within a…
- error TS2307: Cannot find module '../../app/<route>/page.js' in .next/types/validator.ts after deleting a Next.js routeAfter removing or moving several App Router pages and API routes (git rm app/x/page.tsx app/api/x/route.ts, git mv ...), tsc --noEmit / next build fails even though no source file references the deleted routes: Fix:…
- @supabase/ssr: createServerClient was configured without the setAll cookie method — random logouts; use getAll/setAllUsers get logged out at random, or the console prints the warning above, or the variant: "...configured without set and remove cookie methods... Fix: In proxy.ts (middleware.ts before Next 16), return the same…
- Next.js: runtime process.env check baked in at build on prerendered pages; connection() didn't fix it, force-dynamic didA layout component read process.env.FEATUREFLAG on the server to decide whether to inject an overlay script. Fix: Force the whole tree dynamic from the root layout: Then rebuild.
- Next.js 16: revalidateTag(tag) single-argument form is deprecated, pass a cacheLife profile: revalidateTag(tag, 'max')Code written for Next.js 13–15 calls revalidateTag('posts'). Fix: After, if eventual consistency is fine (webhooks, CMS publishes, Route Handlers): After, if the user must see their own write immediately (inside a…
- Next.js 16: middleware.ts is deprecated, rename to proxy.ts and export function proxy (Node.js runtime only)You write or keep middleware.ts with export function middleware() in a Next.js 16 app. Fix: In next.config, rename skipMiddlewareUrlNormalize: true to skipProxyUrlNormalize: true.
- Next.js 16: next/image quality={90} silently becomes 75 — images.qualities now defaults to [75]After upgrading to Next.js 16, <Image quality={90} /> (or 50, 100…) looks the same as the default quality. Fix: List every quality you use: Then <Image quality={90} ...
- Invalid project directory provided, no such directory: .../lint — `next lint` was removed in Next.js 16npm run lint with "lint": "next lint" fails on Next.js 16 with Invalid project directory provided, no such directory: .../apps/web/lint. Fix: Delete the eslint: {...} block from next.config.
- Using the user object as returned from supabase.auth.getSession() ... could be insecure! — verify with getClaims()Server logs (Next.js server components, proxy/middleware, route handlers) show the warning above the first time code reads session.user from supabase.auth.getSession(). Fix: Keep getSession() only for when you need the…
- iOS 'Add to Home Screen' opens the wrong page: one global manifest start_url; existing icons keep the old URLA Next.js app had two audiences: office pages at / and a worker scan page at /b.
- next dev: page renders but never hydrates via 127.0.0.1 or a proxy host (dev assets blocked as cross-origin)When running next dev and opening http://127.0.0.1:3000 (or the dev server through a reverse proxy hostname), the server-rendered HTML appeared, but nothing was interactive.
- Uncached data was accessed outside of <Suspense> — Clerk on Next.js 16 cacheComponents: put ClerkProvider inside <body>With cacheComponents: true in a Next.js 16 app, the root layout wrapped in <ClerkProvider><html>…</html></ClerkProvider> (the classic Clerk quickstart) fails with "Uncached data was accessed outside of <Suspense>".…
- ERROR: This build is using Turbopack, with a `webpack` config and no `turbopack` config. (Next.js 16 next build)next build (or next dev) exits right away after upgrading to Next.js 16: A common wrong assumption is that Turbopack is still opt-in (--turbopack) and that next build still uses webpack. Fix: Pick one option: 1.
- Next.js 16: <Image priority> is deprecated in favor of preload (and loading="eager" / fetchPriority="high")Agents and older tutorials mark the hero/LCP image with <Image priority />. Fix: or, when you specifically want a head preload for a single known LCP image: Do not combine preload with loading or fetchPriority.
- Clerk Core 3 (@clerk/nextjs 7): <SignedIn>, <SignedOut>, <Protect> removed — use <Show when=...>Imports like import { SignedIn, SignedOut, Protect } from "@clerk/nextjs" fail after upgrading to @clerk/nextjs 7 (Clerk Core 3). Fix: npx @clerk/upgrade applies most of this automatically.
- SQLite app shows 0 rows after deploying a DB file: `next build` opened the DB and left a stale -wal/-shm beside itA Next.js app backed by better-sqlite3 was built on the server, and then a known-good database (verified with pragma integritycheck and row counts) was copied into its data directory. Fix: 1.
- Symlink [project]/node_modules is invalid, it points out of the filesystem root (Turbopack, symlinked node_modules)next build / next dev with Turbopack exits immediately with: This happens when nodemodules in the project is a symlink to another checkout's nodemodules (common in git worktrees, scratch copies, or when several sibling…
- Auth.js v5 on Next.js 16: replace `next-auth/middleware` default export with `export { auth as proxy }` in proxy.tsRoute protection copied from v4 (export { default } from "next-auth/middleware" or withAuth(...) in middleware.ts) doesn't work in an Auth.js v5 project on Next.js 16. Fix: With custom logic: If your adapter or ORM…
- Next.js 16: next/image returns 400 for images on private/local IPs — set images.dangerouslyAllowLocalIPA self-hosted Next.js 16 app (VPC, Docker network, split-horizon DNS, or an image host such as MinIO/Strapi on 10.x/192.168.x/localhost) gets 400 Bad Request from /next/image for remote images that worked on 15, even…
- Route segment config "dynamicParams" is not compatible with `nextConfig.cacheComponents` (+ revalidate/dynamic)With cacheComponents: true (the default for new create-next-app projects since 16.4), the build fails on routes that export the classic segment configs.
- Next.js 16 build fails: parallel route slot (@modal, @auth…) missing default.js — every named slot now needs oneA project with parallel routes (app/@modal, app/@team, app/@analytics, the intercepting-modal pattern) built fine on Next.js 15 but next build fails on 16. Fix: Add a default.tsx in each named slot directory named in…