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

errbuddy

v1.1.1

Published

Your terminal's error best friend

Readme

Error: connect ECONNREFUSED 127.0.0.1:5432
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:494:16) {
  errno: -61,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 5432
}
    at Object.<anonymous> (/Users/dev/project/src/db.ts:12:3)
    at Module._compile (node:internal/modules/cjs/loader:1364:14)
    at Object..js (node:internal/modules/cjs/loader:1422:10)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Function._load (node:internal/modules/cjs/loader:1019:12)
❌ Connection Refused

📍 src/db.ts:12

💡 Nothing is accepting connections on port 5432 right now.

🛠 Fix: Start the service listening on port 5432.
   Confirm the connection string matches the running service.

ℹ️  Run with eb --verbose for full details

Installation

npm install -g errbuddy

Option A — Automatic (recommended)

eb init

Installs a shell hook — every command you run gets errbuddy interception automatically. No prefix needed ever again.

Option B — Explicit

eb run <your command>

No setup required. Prefix any command to run it through errbuddy.

Usage

# after eb init — no changes to how you work
npm run dev
python manage.py runserver
go run .
cargo run

# explicit mode — works anywhere, no setup
eb run npm run dev
eb run python manage.py runserver
eb run go run .
eb run cargo run

# full diagnostic output
eb run -v npm run dev

What errbuddy understands

| Runtime | What it catches | |---|---| | Node.js / TypeScript | TypeError, ECONNREFUSED, module not found, unhandled rejections, heap OOM | | Python | Tracebacks, ModuleNotFoundError, import errors | | Go | Runtime panics, goroutine dumps, build errors | | Rust | Compiler errors (E-codes), thread panics | | Java / JVM | Uncaught exceptions, stack traces | | Docker | Daemon errors, missing images | | Prisma | P-codes, init failures, constraint violations | | Next.js | Compilation failures, unresolved modules | | Rails | ActiveRecord errors, routing errors | | PostgreSQL | Auth failures, role errors, connection refused | | Generic | HTTP 4xx/5xx, disk full (ENOSPC), port conflicts |

How it works

errbuddy spawns your command as a child process and pipes stdout through untouched in real time. It watches stderr with a two-tier hybrid detector:

| Tier | Regex | Output | |---|---|---| | Known | Anchored patterns for 11 runtimes | Full panel — title, why, fix suggestions | | Heuristic | Broad keyword net (error, failed, exception, internal server error, …) | Minimal panel — reformatted, no fake explanation | | Passthrough | Everything else | Written to stderr as-is, untouched |

When a known error is detected, it runs the raw text through a classify → explain → suggest pipeline and replaces the noise with a clean panel. When an unknown error is detected, it shows a minimal panel with no invented explanation. Unrecognised output passes through untouched — errbuddy stays silent unless it has something useful to say.

Duplicate errors within a 10-second window are suppressed and counted, so long-running servers don't flood the terminal with the same panel.

Verbose mode

Verbose mode keeps the same panel, then adds the signature, confidence, runtime, and raw error details underneath.

══════════════════════
❌ Connection Refused
══════════════════════

📍 Location
src/db.ts:12

──────────────
💡 What went wrong
The target service actively refused the connection attempt.

👉 Why
Nothing is accepting connections on port 5432 right now.

──────────────
🛠 Fix
1. Start the service listening on port 5432.
2. Confirm the connection string matches the service that should be running.

──────────────
🧭 Signature
connection-refused (97% confidence)

──────────────
🌐 Runtime
Node.js

──────────────
🔎 Raw Error
connect ECONNREFUSED 127.0.0.1:5432

Activate with eb run -v <command> or set CLIX_VERBOSE=1.

Unknown error detection

For errors that don't match any known signature (Django OperationalError, Express middleware failures, custom exceptions, etc.), errbuddy shows a minimal panel instead of letting raw lines scroll by:

⚠️  Internal Server Error: /api/users/
OperationalError: no such table: users
ℹ️  Unrecognised error — showing raw output

No invented 💡 Why or 🛠 Fix — those only appear when errbuddy actually understands the error. The server keeps running. Exit codes are not affected for non-fatal errors.

If the same unknown error repeats within 10 seconds, dedup kicks in:

⚠️  Same error repeated ×3 — suppressing duplicates

Changelog

v1.1.0

  • Hybrid detection — a broad heuristic net now catches unknown errors (e.g. Internal Server Error, OperationalError) and renders a minimal panel instead of raw output
  • Adaptive flush — heuristic error blocks flush after a single line + blank, so short 2-line framework errors are caught immediately
  • Dedup for unknown errors — same heuristic panel suppressed and counted within a 10-second window

v1.0.1

  • Windows fixspawn now uses shell: true on Windows so npm, yarn, and pnpm resolve correctly (ENOENT on .cmd scripts is gone)
  • -v flag fix — verbose flag is now scoped to the run subcommand; previously -v was passed as the command to spawn, causing ENOENT
  • Server log streaming — passthrough stderr lines (Django, Next.js, Rails access logs) are no longer gated on stdout activity; they stream immediately

Contributing

Open an issue with the raw stderr text whenever errbuddy misses or misclassifies something. The tool is still early, and every good report turns into a better signature in the next release.

License

MIT © errbuddy contributors