Error: A cross-origin error was thrown. React doesn't have access to the actual error object in development.
An error happened in a script loaded from another origin, so the browser hid the details from React.
Seen on:
React
Meaning
Development builds served from a different port/host or scripts without crossorigin hide error details. Often seen with CDN React builds or source-map/devtools setups.
Common causes
- Scripts loaded cross-origin without crossorigin="anonymous"
- Code evaluated via eval-based source maps in some setups
⚡ Quick fix
- Serve scripts same-origin in development
- Add crossorigin="anonymous" and CORS headers on the script host
- Check the browser console for the original error
Detailed fix by platform
React
<script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>
How to diagnose
- Source — Which script origin?
- Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026