Hi,
I'm following this "Custom Widget" sample from
https://developers.arcgis.com/javascript/latest/sample-code/widgets-custom-recenter/index.html#1c
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)
at index.html:69
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.
m.
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.
Cheers
Adam
Great!!!
I've solve my problem.
Thank you Adam