🔧 Troubleshooting
If you find yourself stuck on strange error/behaviors, it’s worth checking out this list of common problems and fixes. You might just save yourself a few hours of debugging.🐢 Dev server hangs on macOS (Desktop/iCloud)
Symptoms:npm run dev
hangs at “starting…” or never shows logs- Hot reload doesn’t trigger or is extremely slow
- Projects inside
~/Desktop
are often synced by iCloud and indexed by Spotlight - Vite/React Router file watchers get interrupted (EINTR), breaking the dev server
- Move your repo out of Desktop/iCloud, e.g. to
~/Projects
- Clean dependencies and reinstall
- Start the dev server again
- Do not keep active repos under
~/Desktop
or other iCloud-synced locations - If you still see odd hangs, reboot once to clear stale file watcher handles
⚛️ React 18 vs 19 dependency mismatches (warnings, odd behavior)
Symptoms:- Lots of npm peer dependency warnings
- Some libraries (e.g., UI/Checkout) expect React 18 while the project uses React 19
- Clean and reinstall (often enough after moving directories)
- Pin React 19 across the tree via npm overrides
package.json
(top-level):
- Verify
react
and react-dom
resolved.
🧭 React Router: failed to load in virtual:react-router/server-build
after adding a route
Symptoms:
- Browser overlay or terminal shows:
- After creating/renaming a route file, Vite’s module graph can get stale and the React Router virtual server build doesn’t pick up the new file until a restart.
- Stop the dev server
- Start it again
- The file actually exists at that path and is saved
- Path and filename casing match your OS and route config
- If you recently renamed/moved files, a restart clears the stale graph; if it persists, try removing
.vite
cache by restarting or a clean install
- Reload the page; the route should resolve without the error
- GitHub discussion confirms restart fixes it:
https://github.com/remix-run/react-router/discussions/13385
- Related:
https://www.reddit.com/r/reactjs/comments/1k4rbpa/react_router_7_failed_to_load_url_types/
- Similar underlying cause (Remix):
https://stackoverflow.com/questions/79115905/internal-server-error-failed-to-load-url-in-virtualremix-server-build-does-th
- Vite HMR flakiness context:
https://github.com/vitejs/vite/issues/18217
Still stuck? Open an issue with your environment details and any relevant context in the #ask-for-help channel in the Discord Server.