"Script error." in JavaScript — What It Means and How to Fix It

What the JavaScript error "Script error." means and how to fix it.

Published October 30, 2026

"Script error." is a deliberately vague error message shown when an error occurs in a script loaded from a different origin without CORS permissions.

Key points

  • Add the crossorigin attribute to the script tag and appropriate CORS headers on the server to see the real error details
More JavaScript articles