Skip to content
JS
JavaScript error

TypeError

The JavaScript exception "class constructors must be invoked with 'new'" occurs when a class constructor is called without the new keyword. All class constructors must be called with new.

Reference entryJavaScriptFetched
TypeError: Class constructor X cannot be invoked without 'new' (V8-based)
As listed by MDN Web Docs
TypeError: Class constructors cannot be invoked without 'new' (V8-based)
As listed by MDN Web Docs
TypeError: class constructors must be invoked with 'new' (Firefox)
As listed by MDN Web Docs
TypeError: Cannot call a class constructor without |new| (Safari)
As listed by MDN Web Docs
Category
TypeError
Severity
error
Runtime
both
or press Cmd/Ctrl + Enter. The text is only sent to this site to match it.
Source: MDN Web Docs. Data fetched 2026-09-25T01:48:37.273Z.