Skip to content

feat(dev): minimal error page - #4699

Merged
pi0 merged 3 commits into
mainfrom
feat/minimal-err
Oct 3, 2026
Merged

pi0 merged 3 commits into
mainfrom
feat/minimal-err

Conversation

@pi0x

@pi0x pi0x commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Replaces youch, youch-core and source-map in the dev error handler with a small built-in renderer.

  • Source maps via Node.js SourceMap (findEntry), syntax highlighting via rangi (bundled, not a runtime dependency)
  • Self-contained HTML page: code frame, stack, cause as JSON, request info, copy buttons and light/dark theme
  • Terminal output with util.styleText (respects NO_COLOR)

Install size:

  • 95 fewer files (531 → 436)
  • 339 KB smaller (2.47 MB → 2.13 MB, −13.7%)
  • 3 fewer dependencies (youch, youch-core and source-map are gone; rangi is only a devDependency), leaving 9 fewer packages in dist/node_modules (18 → 9)

error page


Thanks to youch for powering Nitro's error page until now and for the inspiration ❤️

🤖 Generated with AI assistant

Replace `youch`, `youch-core` and `source-map` with a small built-in renderer using Node.js built-ins (`SourceMap`, `util.styleText`) and `rangi` (bundled) for highlighting.
@vercel

vercel Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nitro.build Ready Ready Preview Oct 3, 2026 12:09pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e869b1ac-2125-49aa-a881-a683719c2c76
📥 Commits

Reviewing files that changed from the base of the PR and between db7847b and 991d800.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (12)
  • .agents/vite.md
  • build.config.ts
  • docs/1.docs/50.lifecycle.md
  • package.json
  • src/runtime/internal/error/_highlight.ts
  • src/runtime/internal/error/_sourcemap.ts
  • src/runtime/internal/error/_stack.ts
  • src/runtime/internal/error/_utils.ts
  • src/runtime/internal/error/dev.ts
  • src/runtime/internal/vite/dev-worker.mjs
  • test/unit/dev-error-render.test.ts
  • test/unit/dev-error-stack.test.ts
 _____________________________________
< CORS error? I'll cross that bridge. >
 -------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/nitro@4699

commit: 6cf94d5

@pi0 pi0 changed the title feat(dev): minimal zero-dependency error page feat(dev): minimal error page Oct 3, 2026

This branch was successfully deployed

1 active deployment
Preview — 6cf94d59 Deployed Oct 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants