Copied to Clipboard
Breaks on Linux (case-sensitive).
6️⃣ Hidden Backend Assumptions
Frontend expects:
- certain API shape
- specific data
- seeded database
But:
- staging DB ≠ local DB
- API version mismatch
7️⃣ Untracked Local Changes
Local hacks:
- temporary fixes
- debug configs
- ignored files
Not committed → not reproducible
🧠 The Real Problem
"Works on my machine" happens when:
Your app depends on things that are not explicitly defined.
Anything not in:
- code
- config
- environment setup
...is a hidden risk.
✅ How to Actually Fix It
✔ Make Environments Reproducible
Use:
- Docker
- Dev Containers
- consistent setup scripts
✔ Lock Versions
node version
package versions
Use:
✔ Validate Environment Early
Fail fast:
if (!process.env.API_URL) {
throw new Error('Missing API_URL');
}
✔ Avoid Global Dependencies
Everything should be:
- project-local
- version-controlled
✔ Use CI as Source of Truth
- If it doesn’t pass CI:
- It doesn’t work.
✔ Seed and Sync Data
- consistent test data
- predictable backend state
⚡ Modern Tools Help — But Don’t Solve It
Docker, cloud, and CI reduce the problem.
They don’t eliminate:
- bad assumptions
- missing configs
- inconsistent workflows
🔥 Final Thought
"Works on my machine" isn’t a joke.
It’s a signal.
A signal that your system:
- isn’t reproducible
- isn’t predictable
- isn’t fully defined
Fix that — and the phrase disappears.