<?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 Re: Error: requires a fetch implementation in ArcGIS REST JS Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-js-questions/error-requires-a-fetch-implementation/m-p/1081454#M6</link>
    <description>&lt;P&gt;Hi, did you follow the instructions on the top of the page here:&amp;nbsp;&lt;A href="https://esri.github.io/arcgis-rest-js/guides/node" target="_blank"&gt;https://esri.github.io/arcgis-rest-js/guides/node&lt;/A&gt;&amp;nbsp;?&lt;/P&gt;&lt;P&gt;Specifically, installing these modules:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;npm install @esri/arcgis-rest-request @esri/arcgis-rest-auth cross-fetch isomorphic-form-data&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 21 Jul 2021 17:57:20 GMT</pubDate>
    <dc:creator>GavinRehkemper</dc:creator>
    <dc:date>2021-07-21T17:57:20Z</dc:date>
    <item>
      <title>Error: requires a fetch implementation</title>
      <link>https://community.esri.com/t5/arcgis-rest-js-questions/error-requires-a-fetch-implementation/m-p/1079684#M5</link>
      <description>&lt;P&gt;Hello Sirs,&lt;/P&gt;&lt;P&gt;I'm new in ArcGIS REST JS and I'm trying the first scripts following the tutorials. To do this try, I'm using the NodeJS environment.&lt;/P&gt;&lt;P&gt;Unfortunately, in all my tests, I always get the error&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Error: `arcgis-rest-request` requires a `fetch` implementation and global variables for `Promise` and `FormData` to be present in the global scope. You are missing `fetch`, `FormData`. We recommend installing the `node-fetch`, `isomorphic-form-data` modules at the root of your application to add these to the global scope. See &lt;A href="https://bit.ly/2KNwWaJ" target="_blank" rel="noopener"&gt;https://bit.ly/2KNwWaJ&lt;/A&gt; for more info.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;I also try the much simple test that I found&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;{&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;geocode&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;}&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;from&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'@esri/arcgis-rest-geocoding'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;geocode&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"LAX"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;.&lt;/SPAN&gt;&lt;SPAN&gt;then&lt;/SPAN&gt;&lt;SPAN&gt;((&lt;/SPAN&gt;&lt;SPAN&gt;response&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;console&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;log&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;response&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;});&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;run by the command 'node mytestfile.js', but the result is always the same.&lt;/P&gt;&lt;P&gt;I installed the packages '&lt;A href="https://github.com/lquixada/cross-fetch" target="_blank" rel="noopener"&gt;https://github.com/lquixada/cross-fetch&lt;/A&gt;' and '&lt;A href="https://github.com/form-data/isomorphic-form-data" target="_blank" rel="noopener"&gt;https://github.com/form-data/isomorphic-form-data&lt;/A&gt;' so I can't understand what I wrong.&lt;/P&gt;&lt;P&gt;Could you please help me?&lt;BR /&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jul 2021 15:19:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-js-questions/error-requires-a-fetch-implementation/m-p/1079684#M5</guid>
      <dc:creator>GiorgioTodeschini</dc:creator>
      <dc:date>2021-07-16T15:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Error: requires a fetch implementation</title>
      <link>https://community.esri.com/t5/arcgis-rest-js-questions/error-requires-a-fetch-implementation/m-p/1081454#M6</link>
      <description>&lt;P&gt;Hi, did you follow the instructions on the top of the page here:&amp;nbsp;&lt;A href="https://esri.github.io/arcgis-rest-js/guides/node" target="_blank"&gt;https://esri.github.io/arcgis-rest-js/guides/node&lt;/A&gt;&amp;nbsp;?&lt;/P&gt;&lt;P&gt;Specifically, installing these modules:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;npm install @esri/arcgis-rest-request @esri/arcgis-rest-auth cross-fetch isomorphic-form-data&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 21 Jul 2021 17:57:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-js-questions/error-requires-a-fetch-implementation/m-p/1081454#M6</guid>
      <dc:creator>GavinRehkemper</dc:creator>
      <dc:date>2021-07-21T17:57:20Z</dc:date>
    </item>
  </channel>
</rss>

