I'm following this "Custom Widget" sample from
But when i try to run this example in chrome i'm getting ths error:
(index):198 Uncaught (in promise) TypeError: Class constructor Recenter cannot be invoked without 'new'
at new d ((index):198)
I've notice that if i replace the "js" generated from my tsc with js in the example everything run correctly.
In attach its possible to see my Recenter.js generated after Recenter.tsx compilation.
(It's possible to see the difference with the original in the example)
during compilation, everything is succesfully done.
(I've the latest version of Node and Typescript)
Is there any incompatibility with the versions?
Thank you in advance.
Solved! Go to Solution.
I ran into the same problem. To fix it for me I used compilerOptions.target = "es5" in the tsconfig.json. To allow the tsc command to compile to es5 I also needed to install @types/node. Hope that helps.