npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

intellerror

v1.1.0

Published

Intelligent error formatting for Node.js and Browser. Transforms ugly stack traces into clean, readable, and actionable output with smart code suggestions.

Downloads

227

Readme

🧠 IntellError

Transform ugly JavaScript/Node.js stack traces into clean, readable, and actionable output. Designed for humans, not robots.

npm version License: ISC Tests

✨ Why IntellError?

Standard error logs are noisy, cluttered with node_modules, and lack context. IntellError gives you the "Why" and "How to Fix" instantly.

  • Clean Stack Traces: Auto-hides Node.js internals and collapses node_modules noise.
  • 📍 Source Map Support: Auto-translates minified/compiled code back to original TypeScript/Source locations.
  • 🔗 Async Stack Chaining: Recursively traverses Error.cause to show the full async story.
  • 💡 Actionable Suggestions 2.0: 100+ context-aware rules with confidence scoring.
  • 📸 Code Snapshots: See the exact line of code directly in your terminal (Node.js only).
  • 📊 Observability Ready: Includes JSON Mode, Error Fingerprinting, and Severity Levels.
  • 🌐 Universal Runtime Support: Native support for Node.js, Bun, Deno, and Edge/Serverless.

🚀 Quick Start (Zero-Config)

Add this at the very top of your entry file to catch all unhandled errors automatically.

For Browser (React, Vite, Next.js)

import 'intellerror/register';

For Node.js / Bun / Deno

# Node.js 20+
node --import intellerror/register index.js

# Bun
bun index.ts  # (Auto-detected if you import it)

🛠️ Advanced Features

🤖 Machine-Readable JSON Mode

Enable production logging that flows perfectly into Datadog, Splunk, or Loki.

import { formatErrorJSON } from 'intellerror';

try {
  // your code
} catch (err) {
  console.log(formatErrorJSON(err));
}

🔗 Error Chaining (Error.cause)

Never lose context again. IntellError recursively handles nested errors.

  ERROR  Failed to fetch user from DB
  2026-04-06T06:07:49.123Z | uptime: 12.5s | ID: a1b2c3d4

  🔗 Causes:
  caused by: Error: Connection refused (timeout after 5000ms)

📍 Source Map Integration

If a .map file exists alongside your compiled script, IntellError will automatically show the original source location.

📍 Location:
src/users/service.ts:45:10 [mapped]   ← YOUR CODE

⚙️ Configuration

Fine-tune the output or add your own project-specific intelligence.

import { setupConfig } from 'intellerror';

setupConfig({
  showNodeModules: false,    // Hide noise?
  showNodeInternals: false,  // Hide node internals?
  suggestionsEnabled: true,  // Show the "💡 Suggestions"?
  sourceMapsEnabled: true,   // Enable original source mapping?
  webhookUrl: 'https://...'  // Push to Slack/Discord?
});

📖 Manual Usage

Terminal / Node.js

import { formatError } from 'intellerror';

try {
  // your code...
} catch (err) {
  console.log(formatError(err)); 
}

Browser Console (React/Vite)

import { formatErrorBrowser } from 'intellerror';

try {
  // ...
} catch (err) {
  // MUST use the spread operator (...) for CSS styling
  console.log(...formatErrorBrowser(err));
}

🚅 Framework Integration

Express Middleware

import express from 'express';
import { errorFormatter } from 'intellerror';

const app = express();
app.use(errorFormatter());


🌍 Environment Variables (Zero-Config)

You can configure IntellError without changing a single line of code using environment variables.

| Variable | Default | Description | | :--- | :--- | :--- | | INTELLERROR_JSON | false | Enable structured JSON output for all unhandled errors. | | INTELLERROR_SOURCE_MAPS | true | Enable/disable original source mapping via .map files. | | INTELLERROR_SUGGESTIONS | true | Show the "💡 Suggestions" section. | | INTELLERROR_SHOW_MODULES | false | Show node_modules frames in the stack trace. | | INTELLERROR_SHOW_INTERNALS | false | Show Node.js internal frames in the stack trace. | | INTELLERROR_SEARCH_LINKS | true | Show troubleshooting links. |


🎮 Examples

Explore the examples/ directory for ready-to-run demos:

  • npm run example:basic
  • npm run example:async
  • npm run example:advanced (New: Chaining & JSON mode)

📄 License

MIT © darshan1005


🤝 Contributing

IntellError is open for contributions! Whether it's adding new suggestion rules, improving the parser, or adding more framework integrations, feel free to open a PR or Issue on GitHub.

Built with humans in mind.