runtime-debug
Original:🇺🇸 English
Translated
Debug and verification workflow for runtime-bundle and module-resolution regressions. Use when diagnosing unexpected module inclusions, bundle size regressions, or CI failures related to NEXT_SKIP_ISOLATE, nft.json traces, or runtime bundle selection (module.compiled.js). Covers CI env mirroring, full stack traces via __NEXT_SHOW_IGNORE_LISTED, route trace inspection, and webpack stats diffing.
2installs
Sourcevercel/next.js
Added on
NPX Install
npx skill4agent add vercel/next.js runtime-debugTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Runtime Debug
Use this skill when reproducing runtime-bundle, module-resolution, or user-bundle inclusion regressions.
Local Repro Discipline
- Mirror CI env vars when reproducing CI failures.
- Key variables: forces webpack (turbopack is default),
IS_WEBPACK_TEST=1skips packing next.js.NEXT_SKIP_ISOLATE=1 - For module-resolution validation, always rerun without .
NEXT_SKIP_ISOLATE=1
Stack Trace Visibility
Set to disable the ignore-list filtering in dev server error output. By default, Next.js collapses internal frames to , which hides useful context when debugging framework internals. Defined in .
__NEXT_SHOW_IGNORE_LISTED=trueat ignore-listed framespackages/next/src/server/patch-error-inspect.tsUser-Bundle Regression Guardrail
When user starts bundling internal Node-only helpers unexpectedly:
next build- Inspect route trace artifacts ().
.next/server/.../page.js.nft.json - Inspect traced server chunks for forbidden internals (e.g. ,
next/dist/server/stream-utils/node-stream-helpers.js).node:stream/promises - Add a assertion that reads the route trace and traced server chunks, and fails on forbidden internals. This validates user-project bundling (not publish-time runtime bundling).
test-start-webpack
Bundle Tracing / Inclusion Proof
To prove what user bundling includes, emit webpack stats from the app's :
next.config.jsjs
// next.config.js
module.exports = {
webpack(config) {
config.profile = true
return config
},
}Then use and diff between modes. This gives concrete inclusion reasons (e.g. which module required ) and is more reliable than analyzer HTML alone.
stats.toJson({ modules: true, chunks: true, reasons: true })webpack-stats-server.jsonnode:stream/promisesRelated Skills
- - flag wiring (config/schema/define-env/runtime env)
$flags - - DCE-safe require patterns and edge constraints
$dce-edge - - entry-base boundaries and vendored React
$react-vendoring