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

error-to-fix

v1.1.1

Published

Instant fixes for 3000+ error patterns across 50+ languages

Downloads

436

Readme

⚡ error-to-fix

Paste any error. Get the fix. Instantly.

3,000+ error patterns · 50+ languages · Zero AI latency · Works offline

npm errors license


Why?

You Google an error → scroll through 5 StackOverflow answers → find the fix buried in comment #3.

error-to-fix gives you the fix in < 1 second. Offline. No AI hallucinations. Just a curated, regex-matched database of real fixes.


Install

# Use instantly
npx error-to-fix "your error message"

# Watch mode
your-command 2>&1 | npx error-to-fix --watch

# With explanation
npx error-to-fix "TypeError: x is not a function" --explain

Usage

CLI

# Basic search
error-to-fix "Module not found: Can't resolve './App'"

# Filter by language
error-to-fix "NullReferenceException" --lang csharp

# JSON output (for scripts/editors)
error-to-fix "ENOENT: no such file" --json

Example Output

  ✗ Cannot read properties of undefined (reading 'map') [javascript]

  Fixes:
  1. Add optional chaining: data?.map() or check if array exists before mapping
  2. Initialize state as empty array: useState([]) instead of useState()
  3. Check API response shape — the data might be nested: response.data.items

  Source: MDN / StackOverflow

Features

Watch Mode — Real-time Error Detection

# Pipe any command's output
npm run dev 2>&1 | error-to-fix --watch

# Or pipe build output  
cargo build 2>&1 | error-to-fix --watch

Automatically detects errors in terminal output and shows fixes inline.

Auto Language Detection

# No --lang needed — detected automatically
error-to-fix "Traceback (most recent call last): KeyError: 'name'"
# → Detected: python

error-to-fix "NullReferenceException: Object reference not set"
# → Detected: csharp

Explain Mode

error-to-fix "Cannot read properties of undefined" --explain
  ✗ Cannot read properties of undefined [javascript]

  Why: You're accessing a property on a variable that is undefined.
  This usually happens when data hasn't loaded yet or a key is misspelled.

  Fixes:
  1. Add optional chaining: obj?.property
  2. Check if variable exists before accessing
  3. Initialize with default value

Platforms

| Platform | Status | How to Use | |----------|--------|------------| | 💻 CLI | ✅ Published | npx error-to-fix "your error" | | 🌐 Website | Ready | errortofix.dev | | 📝 VS Code | Ready | Search "error-to-fix" in extensions | | 🌎 Chrome Extension | Ready | Highlights errors on any page | | 🔧 NuGet Analyzer | Ready | Real-time fixes in C#/Rider |


Languages & Tools Covered

Languages: JavaScript, TypeScript, Python, C#, Java, Go, Rust, Swift, Kotlin, Ruby, PHP, Dart, Elixir, Scala

Frameworks: React, Angular, Vue, Svelte, Next.js, Express, Django, Flask, Spring Boot, ASP.NET, Rails

DevOps: Docker, Kubernetes, Terraform, AWS CLI, Azure, GCP, Nginx, Git, GitHub Actions, CI/CD

Databases: PostgreSQL, MySQL, MongoDB, Redis, SQLite, DynamoDB, Elasticsearch

Package Managers: npm, pip, cargo, dotnet, composer, gem, go mod


How It Works

User input: "TypeError: Cannot read properties of undefined (reading 'length')"
     ↓
Regex matching against 3,010 curated patterns
     ↓
Ranked by match score (pattern coverage / query length)
     ↓
Top 3 results with fixes returned in <1ms

No AI. No API calls. No internet required. The entire database ships with the package (~1MB).


Database Format

Each error entry:

{
  "pattern": "Cannot read properties of (undefined|null)",
  "title": "Cannot read properties of undefined/null",
  "lang": "javascript",
  "fixes": [
    "Use optional chaining: obj?.property",
    "Add null check before accessing the property",
    "Ensure the variable is initialized before use"
  ],
  "source": "MDN / StackOverflow"
}

Contributing

We need your help to grow the database!

Add an error in 2 minutes:

  1. Fork this repo
  2. Edit packages/shared/errors-{language}.json
  3. Add your pattern + fixes
  4. Submit a PR

See CONTRIBUTING.md for the full guide.


Programmatic Use

import { search } from 'error-to-fix';

const results = search("ECONNREFUSED 127.0.0.1:5432");
// [{ title: "PostgreSQL connection refused", fixes: [...], lang: "postgresql" }]

Tech Stack

| Component | Tech | |-----------|------| | CLI | Node.js, TypeScript, Commander, Chalk | | Website | Next.js 15, Tailwind CSS 4 | | VS Code Extension | VS Code Extension API | | Chrome Extension | Manifest V3, Service Worker | | NuGet Analyzer | .NET 9, Roslyn | | Database | 3,010 curated JSON patterns |


Roadmap

  • [x] Auto-detect language from error format
  • [x] --watch mode: monitor terminal output and suggest fixes in real-time
  • [ ] Fuzzy search for partial/typo matches
  • [ ] Community voting on fix quality
  • [ ] VS Code: inline fix suggestions on error squiggles
  • [ ] 10,000+ patterns by end of 2026

License

MIT © Satyam Thakur