<?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 Cannot find module 'esri/Map' in JS from TypeScript in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/cannot-find-module-esri-map-in-js-from-typescript/m-p/831907#M8357</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been trying to start working on the custom widget using TypeScript. So I have followed the example from&amp;nbsp;&lt;A href="https://github.com/Esri/jsapi-resources/tree/master/4.x/typescript/demo"&gt;here&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Import statement in main.ts file.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="458704" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/458704_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;I was facing the import statement problem.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="458712" class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/458712_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;Solved the above issue by changing the export option in index.d.ts&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="458711" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/458711_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;My tsconfig.json file,&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="458713" class="jive-image image-4" src="https://community.esri.com/legacyfs/online/458713_pastedImage_4.png" /&gt;&lt;/P&gt;&lt;P&gt;After compiling the ts file, I am trying to recover the issue in main.js file,&lt;/P&gt;&lt;P&gt;My main.js file,&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="458714" class="image-5 jive-image" src="https://community.esri.com/legacyfs/online/458714_pastedImage_6.png" /&gt;&lt;/P&gt;&lt;P&gt;Getting an error while compiling js file,&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="458716" class="image-7 jive-image" src="https://community.esri.com/legacyfs/online/458716_pastedImage_8.png" /&gt;&lt;/P&gt;&lt;P&gt;Browser window:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="458715" class="image-6 jive-image" src="https://community.esri.com/legacyfs/online/458715_pastedImage_7.png" /&gt;&lt;/P&gt;&lt;P&gt;The "Esri/Map" module is cannot be founded in the JS file. If I am missing anything on this above code, kindly comment to solve this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Sep 2019 11:06:01 GMT</pubDate>
    <dc:creator>ShanmugapriyaL</dc:creator>
    <dc:date>2019-09-05T11:06:01Z</dc:date>
    <item>
      <title>Cannot find module 'esri/Map' in JS from TypeScript</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/cannot-find-module-esri-map-in-js-from-typescript/m-p/831907#M8357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been trying to start working on the custom widget using TypeScript. So I have followed the example from&amp;nbsp;&lt;A href="https://github.com/Esri/jsapi-resources/tree/master/4.x/typescript/demo"&gt;here&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Import statement in main.ts file.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="458704" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/458704_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;I was facing the import statement problem.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="458712" class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/458712_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;Solved the above issue by changing the export option in index.d.ts&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="458711" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/458711_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;My tsconfig.json file,&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="458713" class="jive-image image-4" src="https://community.esri.com/legacyfs/online/458713_pastedImage_4.png" /&gt;&lt;/P&gt;&lt;P&gt;After compiling the ts file, I am trying to recover the issue in main.js file,&lt;/P&gt;&lt;P&gt;My main.js file,&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="458714" class="image-5 jive-image" src="https://community.esri.com/legacyfs/online/458714_pastedImage_6.png" /&gt;&lt;/P&gt;&lt;P&gt;Getting an error while compiling js file,&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="458716" class="image-7 jive-image" src="https://community.esri.com/legacyfs/online/458716_pastedImage_8.png" /&gt;&lt;/P&gt;&lt;P&gt;Browser window:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="458715" class="image-6 jive-image" src="https://community.esri.com/legacyfs/online/458715_pastedImage_7.png" /&gt;&lt;/P&gt;&lt;P&gt;The "Esri/Map" module is cannot be founded in the JS file. If I am missing anything on this above code, kindly comment to solve this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 11:06:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/cannot-find-module-esri-map-in-js-from-typescript/m-p/831907#M8357</guid>
      <dc:creator>ShanmugapriyaL</dc:creator>
      <dc:date>2019-09-05T11:06:01Z</dc:date>
    </item>
  </channel>
</rss>

