<?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 How to find module “fs” in MS Code with TypeScript? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-find-module-fs-in-ms-code-with-typescript/m-p/251695#M23310</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have include a definition file for node by running following command:&amp;nbsp;&lt;EM&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;npm install &lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;--&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;save&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;-&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;dev &lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--red-800); border: 0px; font-weight: inherit; font-size: 13px;"&gt;@types&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;/&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;node&lt;/SPAN&gt;&lt;/EM&gt;&lt;CODE style="background-color: transparent; border: 0px; font-weight: inherit;"&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/CODE&gt;Also included it in package.json:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;"devDependencies": {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; "@types/arcgis-js-api": "^4.12.0",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; "@types/node": "^14.6.0",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; "dojo-typings": "1.11.9",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; "npm-run-all": "^4.1.3",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; "reload": "2.3.1",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; "rimraf": "^2.6.2",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; "typescript": "3.9.7"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When execute this line of code "const fs=require("fs");", it looks for the module in JS 4.12 instead of "node", and&amp;nbsp; complains "undefinedModule".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rose&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;/DIV&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Aug 2020 15:46:35 GMT</pubDate>
    <dc:creator>RoseZhou2</dc:creator>
    <dc:date>2020-08-26T15:46:35Z</dc:date>
    <item>
      <title>How to find module “fs” in MS Code with TypeScript?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-find-module-fs-in-ms-code-with-typescript/m-p/251695#M23310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have include a definition file for node by running following command:&amp;nbsp;&lt;EM&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;npm install &lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;--&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;save&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;-&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;dev &lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--red-800); border: 0px; font-weight: inherit; font-size: 13px;"&gt;@types&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;/&lt;/SPAN&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;node&lt;/SPAN&gt;&lt;/EM&gt;&lt;CODE style="background-color: transparent; border: 0px; font-weight: inherit;"&gt;&lt;SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/CODE&gt;Also included it in package.json:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;"devDependencies": {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; "@types/arcgis-js-api": "^4.12.0",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; "@types/node": "^14.6.0",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; "dojo-typings": "1.11.9",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; "npm-run-all": "^4.1.3",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; "reload": "2.3.1",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; "rimraf": "^2.6.2",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; "typescript": "3.9.7"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When execute this line of code "const fs=require("fs");", it looks for the module in JS 4.12 instead of "node", and&amp;nbsp; complains "undefinedModule".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rose&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;/DIV&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2020 15:46:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-find-module-fs-in-ms-code-with-typescript/m-p/251695#M23310</guid>
      <dc:creator>RoseZhou2</dc:creator>
      <dc:date>2020-08-26T15:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to find module “fs” in MS Code with TypeScript?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-find-module-fs-in-ms-code-with-typescript/m-p/251696#M23311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I'm getting started on learning Typescript, Node, NPM, and everything else, this is one that I'm also running into. I'm trying to run something similar with the require function to get a local JSON file, but it continues to fail within the JSAPI (4.17) when I believe it should be running a different require method.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2020 14:16:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-find-module-fs-in-ms-code-with-typescript/m-p/251696#M23311</guid>
      <dc:creator>BenjaminCumberland</dc:creator>
      <dc:date>2020-11-04T14:16:36Z</dc:date>
    </item>
  </channel>
</rss>

