Paste any error. Get the fix. Instantly.
3,000+ error patterns · 50+ languages · Zero AI latency · Works offline
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.
# 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# 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 ✗ 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
# 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 --watchAutomatically detects errors in terminal output and shows fixes inline.
# 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: csharperror-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
| 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: 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
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).
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"
}We need your help to grow the database!
Add an error in 2 minutes:
- Fork this repo
- Edit
packages/shared/errors-{language}.json - Add your pattern + fixes
- Submit a PR
See CONTRIBUTING.md for the full guide.
import { search } from 'error-to-fix';
const results = search("ECONNREFUSED 127.0.0.1:5432");
// [{ title: "PostgreSQL connection refused", fixes: [...], lang: "postgresql" }]| 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 |
- Auto-detect language from error format
-
--watchmode: 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
MIT © Satyam Thakur