A Node.js library that formats error stack traces into clean, readable, and customizable colored output.
pretty-error is a Node.js library that formats error stack traces into clean, colored, and readable output. It solves the problem of cluttered and hard-to-read error messages by applying syntax highlighting and structured layouts, making debugging faster and more intuitive.
Node.js developers who frequently debug applications and want clearer, more organized error output, especially those working in CLI tools or server-side frameworks.
Developers choose pretty-error because it dramatically improves error readability with minimal setup, offers extensive customization through CSS-like theming, and integrates seamlessly into existing Node.js projects without disrupting core functionality.
See node.js errors with less clutter
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Transforms noisy stack traces into color-coded, structured output, as shown in the screenshot comparison, making debugging faster and more intuitive.
Allows CSS-like theming to style error elements, including colors, backgrounds, and padding, with examples in the README for creating minimal or brand-matching themes.
Supports global use via start() or per-error rendering, and integrates easily with frameworks like Express for centralized error logging, as demonstrated in the code snippets.
Provides methods to skip or modify trace lines by package, path, or callback, helping developers focus on relevant code without clutter.
The start() method modifies all error stack traces globally, which can break packages like BlueBird, requiring manual workarounds as admitted in the Troubleshooting section.
Errors thrown in the first tick are not prettified unless startup is delayed with process.nextTick(), adding complexity for asynchronous code handling.
Creating custom themes requires understanding CSS-like rules and RenderKid, which might be non-trivial for developers unfamiliar with this approach.