Browser console
TypeError: Failed to fetch
- What it means
- The browser tried to talk to your server or an external address and couldn't reach it at all.
- Likely causes
- Your local dev server (
npm run dev) stopped running or crashed in the terminal. - The code calls a wrong URL or tries to call an external API directly from the browser instead of the server.
- Your local dev server (
- Prevention
- Make external API and AI calls from Server Actions or Route Handlers on the server, never directly from the browser.
Copy for your agent
The browser shows `TypeError: Failed to fetch`. Check that the dev server is running, inspect the server terminal for errors, and move any external API call to the server.
Was this page helpful?