!
DANGER ZONE // COMMON MISTAKES
AVOID_THESE_V1.0
CRITICAL_KNOWLEDGE

COMMON_MISTAKES

Every vibe coder makes these mistakes at least once. Learn from others' pain so you don't have to experience it yourself. Bookmark this page.

MISTAKE_01 // SEVERITY: CRITICAL

Pushing secrets to GitHub

Why this is dangerous

Once a secret is pushed to GitHub, it's in the git history forever. Bots constantly scan public repos for API keys and will find yours within minutes. You could wake up to a massive cloud bill or compromised accounts.

THE .ENV FILE DANGER

Your .env file should never be committed. It contains your API keys, database passwords, and secrets. Always add .env to your .gitignore file.

API KEYS IN CODE

Never hardcode keys like const API_KEY = "sk-...". Even if you delete the line later, it stays in git history. Use environment variables instead.

HOW TO CHECK GIT HISTORY
# Search for secrets in your git history
git log -p | grep -i "api_key\|secret\|password"

# Use a tool like git-secrets or trufflehog
trufflehog git file://./
IF YOU ALREADY PUSHED SECRETS:
  1. Immediately revoke/rotate the exposed key in your provider's dashboard
  2. Don't just delete the file - the secret is still in history
  3. Use git filter-branch or BFG Repo Cleaner to rewrite history
  4. Force push to overwrite the remote (coordinate with your team)
PRO TIP

Use git-secrets as a pre-commit hook. It automatically blocks commits containing potential secrets. Set it up once and never worry again.

MISTAKE_02 // SEVERITY: HIGH

Ignoring terminal errors

Why this is a problem

That wall of red text isn't decoration - it's your computer telling you exactly what went wrong. Ignoring errors leads to hours of confusion debugging the wrong thing.

RED TEXT MEANS SOMETHING

Terminal colors are meaningful: Red = error, Yellow = warning, Green = success. When you see red, stop and read it.

HOW TO READ STACK TRACES

1. Start from the bottom - The actual error message is usually at the end

2. Find YOUR code - Look for file paths in your project, not library code

3. Note the line number - The stack trace tells you exactly where it broke

4. Read the error type - TypeError, SyntaxError, etc. tell you what kind of problem

"IT WAS WORKING YESTERDAY" SYNDROME

Something changed. Check: Did you update dependencies? Did someone else push code? Did an API change? Did your environment variables expire? Use git diff to see what changed.

PRO TIP

Copy the exact error message and paste it into your AI assistant. Include the full stack trace. This is the fastest path to a solution.

MISTAKE_03 // SEVERITY: MEDIUM

Not understanding localhost

Why this confuses people

localhost means "this computer only." It's not on the internet. Your friend in another city cannot see your localhost:3000 no matter what URL you send them.

"MY FRIEND CAN'T SEE MY SITE"

localhost is your computer talking to itself. To share your site, you need to deploy it (Vercel, Netlify, GitHub Pages) or use a tunnel service like ngrok.

LOCALHOST VS DEPLOYED

localhost:3000 = Your machine only
mysite.vercel.app = Anyone on internet

PORT NUMBERS EXPLAINED

The number after the colon (like :3000) is the port. Think of it as an apartment number in a building.

localhost:3000 and localhost:8080 are different "apartments" on your computer.

If you see "port already in use," another app is using that port. Either stop it or use a different port.

PRO TIP

Use npx ngrok http 3000 to temporarily share your localhost with others. Great for demos and testing webhooks.

MISTAKE_04 // SEVERITY: HIGH

Dependency hell

Why this is a nightmare

Your project depends on packages that depend on other packages. When versions conflict, everything breaks. The error messages are cryptic and nothing makes sense.

VERSION CONFLICTS

Package A needs react@17, Package B needs react@18. Now you have a conflict. Check package.json for version mismatches.

"WORKS ON MY MACHINE"

This usually means different dependency versions. The package-lock.json file locks exact versions. Always commit it and run npm ci (not npm install) in CI/CD.

WHEN TO DELETE NODE_MODULES
# The nuclear option - when nothing else works
rm -rf node_modules package-lock.json
npm install

# Or use npx for a cleaner approach
npx rimraf node_modules
npm install

Try this when: weird errors after pulling changes, after switching Node versions, or when updates behave strangely.

PRO TIP

Use nvm (Node Version Manager) to switch between Node versions. Different projects may need different versions. Run nvm use in each project.

MISTAKE_05 // SEVERITY: HIGH

Not reading error messages

Why this wastes time

Error messages are written by developers to help you fix problems. They literally tell you what's wrong. Reading them carefully can save hours of guessing.

ERRORS TELL YOU WHAT'S WRONG

Cannot read property 'x' of undefined = You're accessing .x on something that doesn't exist

Module not found = You need to install something or your import path is wrong

Unexpected token = You have a syntax error (missing bracket, comma, etc.)

LINE NUMBERS MATTER

Error at line 47 means go to line 47. Your code editor shows line numbers on the left. The bug is at or near that line.

FILE PATHS MATTER

/src/components/Button.js:47 tells you exactly which file. Click on it in your terminal (if supported) to jump there.

PRO TIP

Before asking for help, read the error message out loud. Often, saying it makes you realize what it means. "Cannot find module './button'" - oh, the file is named 'Button' with a capital B.

MISTAKE_06 // SEVERITY: MEDIUM

Asking AI vague questions

Why this gets bad answers

AI can only help with what you tell it. "It doesn't work" gives AI nothing to work with. The more context you provide, the better the answer you'll get.

BAD QUESTION

"My code doesn't work, can you fix it?"

GOOD QUESTION

"I'm getting 'TypeError: Cannot read property map of undefined' on line 23 of UserList.jsx when I try to render users from my API. Here's my code..."

WHAT TO INCLUDE IN YOUR QUESTION

1. The exact error message - Copy and paste it

2. The relevant code - Not your whole project, just the part that's breaking

3. What you expected - "I expected it to show a list of users"

4. What actually happened - "Instead I get a blank screen and this error"

5. What you've tried - "I checked that the API returns data and it does"

SPECIFY YOUR ENVIRONMENT

Mention: What framework (React, Vue, Next.js)? What language version (Node 18, Python 3.11)? What OS? Browser console or terminal? These details matter.

PRO TIP

Use Claude Code or Cursor to give AI direct access to your codebase. Then it can see the full context automatically. Just say "look at this file" and share the error.

MISTAKE_07 // SEVERITY: MEDIUM

Skipping the docs

Why this causes problems

Documentation exists because the tool creators know you'll have questions. Guessing how something works leads to subtle bugs that are hard to track down later.

GUESSING VS READING

Guessing takes 5 minutes and leads to bugs. Reading docs takes 5 minutes and gives you the right answer. Choose wisely.

OFFICIAL DOCS FIRST

Random blog posts may be outdated. Start with official documentation. It's maintained by the people who made the tool.

README FILES

Every repo has a README for a reason. It tells you how to install, configure, and use the project. Read it first.

THE DOCS READING ORDER

1. Quick Start / Getting Started - Get it running first

2. API Reference - When you need specific function details

3. Examples / Tutorials - See how pieces fit together

4. Troubleshooting / FAQ - When something goes wrong

PRO TIP

Use the search function in docs. Press Ctrl/Cmd + K on most doc sites to search. Looking for "authentication"? Search it instead of scrolling through 50 pages.

MISTAKE_08 // SEVERITY: CRITICAL

Not using version control

Why this is dangerous

Without git, one wrong delete and your work is gone forever. No undo. No recovery. Hours, days, or weeks of work - vanished. Git is your safety net.

"I LOST ALL MY CODE"

This sentence is said thousands of times a day by people who didn't use git. Your laptop can die. Your hard drive can fail. Your cat can walk across the keyboard. Git protects you from all of it.

COMMIT EARLY, COMMIT OFTEN
# Start every project with git
git init
git add .
git commit -m "Initial commit"

# Commit after every working change
git add .
git commit -m "Add user login form"

# Push to GitHub for backup
git push origin main
BRANCHES ARE YOUR FRIEND

Want to try something risky? Create a branch. If it works, merge it. If it doesn't, delete the branch. Your main code stays safe.

git checkout -b experiment/new-feature
# Try risky stuff here...
# If it works:
git checkout main && git merge experiment/new-feature
# If it fails:
git checkout main && git branch -D experiment/new-feature
PRO TIP

Use GitHub Desktop or GitKraken if the command line feels intimidating. Visual git clients show you exactly what's happening. Once you're comfortable, the CLI is faster.

TL;DR - THE SURVIVAL CHECKLIST

1. Add .env to .gitignore before your first commit

2. Read error messages - they tell you what's wrong and where

3. Localhost is local - deploy to share with others

4. When in doubt, delete node_modules and reinstall

5. Give AI context - error messages, code, environment

6. Read the docs - especially the Getting Started guide

7. Commit early and often - git is your undo button