<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic TypeError: Class constructor Recenter cannot be invoked without 'new' in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-class-constructor-recenter-cannot-be/m-p/1004997#M70920</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm following this "Custom Widget" sample from&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/widgets-custom-recenter/index.html#1c" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/sample-code/widgets-custom-recenter/index.html#1c&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But when i try to run this example in chrome i'm getting ths error:&lt;/P&gt;&lt;P&gt;(index):198 Uncaught (in promise) TypeError: Class constructor Recenter cannot be invoked without 'new'&lt;BR /&gt;at new d ((index):198)&lt;BR /&gt;at index.html:69&lt;/P&gt;&lt;P&gt;I've notice that if i replace the "js" generated from my tsc with js in the example everything run correctly.&lt;/P&gt;&lt;P&gt;In attach its possible to see my Recenter.js generated after Recenter.tsx compilation.&lt;BR /&gt;(It's possible to see the difference with the original in the example)&lt;/P&gt;&lt;P&gt;during compilation, everything is succesfully done.&lt;/P&gt;&lt;P&gt;(I've the latest version of Node and Typescript)&lt;BR /&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;Is there any incompatibility with the versions?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;m.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Nov 2020 11:21:36 GMT</pubDate>
    <dc:creator>MassimilianoGeppi</dc:creator>
    <dc:date>2020-11-26T11:21:36Z</dc:date>
    <item>
      <title>TypeError: Class constructor Recenter cannot be invoked without 'new'</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-class-constructor-recenter-cannot-be/m-p/1004997#M70920</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm following this "Custom Widget" sample from&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/widgets-custom-recenter/index.html#1c" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/sample-code/widgets-custom-recenter/index.html#1c&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But when i try to run this example in chrome i'm getting ths error:&lt;/P&gt;&lt;P&gt;(index):198 Uncaught (in promise) TypeError: Class constructor Recenter cannot be invoked without 'new'&lt;BR /&gt;at new d ((index):198)&lt;BR /&gt;at index.html:69&lt;/P&gt;&lt;P&gt;I've notice that if i replace the "js" generated from my tsc with js in the example everything run correctly.&lt;/P&gt;&lt;P&gt;In attach its possible to see my Recenter.js generated after Recenter.tsx compilation.&lt;BR /&gt;(It's possible to see the difference with the original in the example)&lt;/P&gt;&lt;P&gt;during compilation, everything is succesfully done.&lt;/P&gt;&lt;P&gt;(I've the latest version of Node and Typescript)&lt;BR /&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;Is there any incompatibility with the versions?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;m.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 11:21:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-class-constructor-recenter-cannot-be/m-p/1004997#M70920</guid>
      <dc:creator>MassimilianoGeppi</dc:creator>
      <dc:date>2020-11-26T11:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: TypeError: Class constructor Recenter cannot be invoked without 'new'</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-class-constructor-recenter-cannot-be/m-p/1006476#M70967</link>
      <description>&lt;P&gt;I ran into the same problem. To fix it for me I used compilerOptions.target = "es5" in the&amp;nbsp;tsconfig.json. To allow the tsc command to compile to es5 I also needed to install&amp;nbsp;@types/node. Hope that helps.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 00:15:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-class-constructor-recenter-cannot-be/m-p/1006476#M70967</guid>
      <dc:creator>AdamLabruyere</dc:creator>
      <dc:date>2020-12-03T00:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: TypeError: Class constructor Recenter cannot be invoked without 'new'</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-class-constructor-recenter-cannot-be/m-p/1006539#M70969</link>
      <description>&lt;P&gt;Great!!!&lt;/P&gt;&lt;P&gt;I've solve my problem.&lt;/P&gt;&lt;P&gt;Thank you Adam&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 08:21:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typeerror-class-constructor-recenter-cannot-be/m-p/1006539#M70969</guid>
      <dc:creator>MassimilianoGeppi</dc:creator>
      <dc:date>2020-12-03T08:21:34Z</dc:date>
    </item>
  </channel>
</rss>

