error-solution-ai-buddy 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,30 +14,9 @@ Stop copying stack traces into a browser. Prefix your command with `errbuddy` an
|
|
|
14
14
|
|
|
15
15
|
</div>
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
TypeError: Cannot read properties of undefined (reading 'map')
|
|
21
|
-
at app.js:12:5
|
|
22
|
-
|
|
23
|
-
╭─ 🤖 Error Buddy Explanation ──────────────────────────────────────╮
|
|
24
|
-
│ │
|
|
25
|
-
│ 📘 What is this? │
|
|
26
|
-
│ You tried to call .map() on a variable that is undefined. │
|
|
27
|
-
│ │
|
|
28
|
-
│ ❓ Why it happens │
|
|
29
|
-
│ The data you expected (probably from an API) wasn't there yet. │
|
|
30
|
-
│ │
|
|
31
|
-
│ ✅ How to fix it │
|
|
32
|
-
│ Check that the variable exists before calling .map(). │
|
|
33
|
-
│ │
|
|
34
|
-
│ 💡 Example │
|
|
35
|
-
│ if (data) { │
|
|
36
|
-
│ data.map(...) │
|
|
37
|
-
│ } │
|
|
38
|
-
│ │
|
|
39
|
-
╰───────────────────────────────────────────────────────────────────╯
|
|
40
|
-
```
|
|
17
|
+
<p align="center">
|
|
18
|
+
<img src="https://raw.githubusercontent.com/sithija-jayasinghe/solution-ai-buddy-v1/main/error-solution-ai-buddy/docs/demo.gif" alt="errbuddy running node app.js: a TypeError appears, followed by an explanation of what went wrong, why, and how to fix it" width="760">
|
|
19
|
+
</p>
|
|
41
20
|
|
|
42
21
|
## Why errbuddy
|
|
43
22
|
|