JavaScript
JavaScript class constructor was called without new
JavaScript tried to call a class constructor like a normal function instead of instantiating it with new.
JavaScript
JavaScript tried to call a class constructor like a normal function instead of instantiating it with new.
Observed message
TypeError: class constructors must be invoked with 'new'
Why it happens
How to fix it
Official reference
MDN: TypeError: class constructors must be invoked with newRelated errors
Explore more