app-router
5 traces
- JSON-file store in Next.js wiped to empty: load() catch returns default + shared .tmp file across worker processesA small Next.js app persists state in data/db.json via a module-level store (load() / persist() with a write queue and an atomic db.json.tmp + rename).
- Next.js 16.3: error.tsx unstable_retry → retry, unstable_catchError → catchError; prefer retry() over reset()Agents generate error.tsx with only reset() (the 13–15 API). Fix: Before (15-era or 16.2): Custom nested boundary that does not swallow notFound()/redirect():
- 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:…
- 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 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…