<?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 ESM Modules Broken - Error resolving module specifier “luxon”. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1139649#M76201</link>
    <description>&lt;P&gt;I am using node v17.4.0 and trying to make a very simple web app. This is the tree structure and I have installed&amp;nbsp;@arcgis/core according to&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/es-modules/" target="_self"&gt;https://developers.arcgis.com/javascript/latest/es-modules/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The map does not load at all, and I get an error:&lt;/P&gt;&lt;P&gt;Uncaught TypeError: Error resolving module specifier “luxon”. Relative module specifiers must start with “./”, “../” or “/”. languageUtils.js:5:508&lt;/P&gt;&lt;LI-CODE lang="markdown"&gt;├── frontend
│ ├── index.html
│ ├── js
│ │ ├── app.js
│ └── node
│          ├── node_modules&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;meta charset="utf-8" /&amp;gt;
  &amp;lt;meta http-equiv="X-UA-Compatible" content="IE=Edge" /&amp;gt;
  &amp;lt;!-- SCRIPTS SECTION START --&amp;gt;
  &amp;lt;!-- ArcGIS --&amp;gt;
  &amp;lt;script src="https://js.arcgis.com/4.22/"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;!-- Local Scripts --&amp;gt;
  &amp;lt;script src="js/app.js" type="module"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;!-- SCRIPTS SECTION END --&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;
  &amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;LI-CODE lang="javascript"&gt;import Map from "../node/node_modules/@arcgis/core/Map.js";
import MapView from "../node/node_modules/@arcgis/core/views/MapView.js";

const map = new Map();

const view = new MapView({
    container: "viewDiv",
    map: map,
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Extremely frustrating trying to move away from AMD to ESM and it doesn't even work out of the box.&lt;/P&gt;</description>
    <pubDate>Tue, 01 Feb 2022 23:40:21 GMT</pubDate>
    <dc:creator>corndog</dc:creator>
    <dc:date>2022-02-01T23:40:21Z</dc:date>
    <item>
      <title>ESM Modules Broken - Error resolving module specifier “luxon”.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1139649#M76201</link>
      <description>&lt;P&gt;I am using node v17.4.0 and trying to make a very simple web app. This is the tree structure and I have installed&amp;nbsp;@arcgis/core according to&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/es-modules/" target="_self"&gt;https://developers.arcgis.com/javascript/latest/es-modules/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The map does not load at all, and I get an error:&lt;/P&gt;&lt;P&gt;Uncaught TypeError: Error resolving module specifier “luxon”. Relative module specifiers must start with “./”, “../” or “/”. languageUtils.js:5:508&lt;/P&gt;&lt;LI-CODE lang="markdown"&gt;├── frontend
│ ├── index.html
│ ├── js
│ │ ├── app.js
│ └── node
│          ├── node_modules&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;meta charset="utf-8" /&amp;gt;
  &amp;lt;meta http-equiv="X-UA-Compatible" content="IE=Edge" /&amp;gt;
  &amp;lt;!-- SCRIPTS SECTION START --&amp;gt;
  &amp;lt;!-- ArcGIS --&amp;gt;
  &amp;lt;script src="https://js.arcgis.com/4.22/"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;!-- Local Scripts --&amp;gt;
  &amp;lt;script src="js/app.js" type="module"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;!-- SCRIPTS SECTION END --&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;
  &amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;LI-CODE lang="javascript"&gt;import Map from "../node/node_modules/@arcgis/core/Map.js";
import MapView from "../node/node_modules/@arcgis/core/views/MapView.js";

const map = new Map();

const view = new MapView({
    container: "viewDiv",
    map: map,
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Extremely frustrating trying to move away from AMD to ESM and it doesn't even work out of the box.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 23:40:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1139649#M76201</guid>
      <dc:creator>corndog</dc:creator>
      <dc:date>2022-02-01T23:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: ESM Modules Broken - Error resolving module specifier “luxon”.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1139659#M76203</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/557143"&gt;@corndog&lt;/a&gt;did you look at any of the samples we have here: &lt;A href="https://github.com/Esri/jsapi-resources/tree/master/esm-samples" target="_blank" rel="noopener"&gt;https://github.com/Esri/jsapi-resources/tree/master/esm-samples&lt;/A&gt;? I'm actually in the process of updating the guide topic page, it needs to mention that you are required to have local build tools in order to use&amp;nbsp;@arcgis/core modules.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also noticed you are importing both the AMD CDN via a script tag, and @arcgis/core, that will cause API conflicts.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 00:05:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1139659#M76203</guid>
      <dc:creator>AndyGup</dc:creator>
      <dc:date>2022-02-02T00:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: ESM Modules Broken - Error resolving module specifier “luxon”.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1139673#M76208</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/180"&gt;@AndyGup&lt;/a&gt;I'm just using HTML + vanilla javascript with node to install the&amp;nbsp;@arcgiscore files locally , can you expand on what you mean by local build tools? Taking the guide topic at face value doesn't work for me.&lt;/P&gt;&lt;P&gt;In the samples you shared should I be copying the jsapi-node implementation?&lt;/P&gt;&lt;P&gt;I will remove the AMD CDN, but I have toggled it out with comments previously and I still get the same error.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 00:42:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1139673#M76208</guid>
      <dc:creator>corndog</dc:creator>
      <dc:date>2022-02-02T00:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: ESM Modules Broken - Error resolving module specifier “luxon”.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1139675#M76209</link>
      <description>&lt;P&gt;Additionally on the guide there is nothing about supported node versions, that would be nice as I still can't rule that out as a potential issue&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 00:45:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1139675#M76209</guid>
      <dc:creator>corndog</dc:creator>
      <dc:date>2022-02-02T00:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: ESM Modules Broken - Error resolving module specifier “luxon”.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1139892#M76224</link>
      <description>&lt;P&gt;You'll want to look at the samples linked in the doc page.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/jsapi-resources/tree/master/esm-samples" target="_blank"&gt;https://github.com/Esri/jsapi-resources/tree/master/esm-samples&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The API is meant to be built with some sort of build tool, webpack, vite, rollup, etc. Those build tools take the relative paths into consideration. That's why you get that weird error.&lt;/P&gt;&lt;P&gt;We don't have a minimum node version, but would assume minimum Node ESM support, which is 12+. But that really comes into play moreso with build tooling.&lt;/P&gt;&lt;P&gt;I was trying to find the blog post from ESM release, but while looking, found this cool story map on. AMD to ESM migration that might be useful.&lt;/P&gt;&lt;P&gt;&lt;A href="https://storymaps.arcgis.com/stories/5eb1c08d87fc437bb6d4d263a8cd9476" target="_blank"&gt;https://storymaps.arcgis.com/stories/5eb1c08d87fc437bb6d4d263a8cd9476&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 16:07:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1139892#M76224</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2022-02-02T16:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: ESM Modules Broken - Error resolving module specifier “luxon”.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1140071#M76236</link>
      <description>&lt;P&gt;Sorry as a beginner this doesn't help, how do I use buildtools? Do you have examples of using buildtools?&lt;/P&gt;&lt;P&gt;Its not very beginner friendly which is quite dissapointing. Even moving the JavaScript out of its own file and into the HTML file still results in the same error :&lt;BR /&gt;&lt;BR /&gt;Uncaught TypeError: Error resolving module specifier “luxon”. Relative module specifiers must start with “./”, “../” or “/”. languageUtils.js:5:508&lt;/P&gt;&lt;P&gt;This looks like an import error on ESRI's part, not mine&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 20:23:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1140071#M76236</guid>
      <dc:creator>corndog</dc:creator>
      <dc:date>2022-02-02T20:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: ESM Modules Broken - Error resolving module specifier “luxon”.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1140072#M76237</link>
      <description>&lt;P&gt;The shared resource has extrremely lacking detail when reading about webpack. I'm at the point of giving up and just reverting to using AMD, absolutely ridiculous documentation that doesn't even work as intended&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 20:25:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1140072#M76237</guid>
      <dc:creator>corndog</dc:creator>
      <dc:date>2022-02-02T20:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: ESM Modules Broken - Error resolving module specifier “luxon”.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1140074#M76238</link>
      <description>&lt;P&gt;Plus according to the chrome console the path '@arcgis....' is illegal as "Relative module specifiers must start with “./”, “../” or “/”." .........................&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 20:28:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1140074#M76238</guid>
      <dc:creator>corndog</dc:creator>
      <dc:date>2022-02-02T20:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: ESM Modules Broken - Error resolving module specifier “luxon”.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1140083#M76240</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/557143"&gt;@corndog&lt;/a&gt; any chance you able to open a tech support ticket? They might be able to help get you pointed in the right direction.&lt;/P&gt;&lt;P&gt;I'm curious why you are looking to migrate to ESM? AMD is a perfectly acceptable approach. We mention that in the documentation here: &lt;A href="https://developers.arcgis.com/javascript/latest/tooling-intro/#should-i-migrate-to-es-modules" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/tooling-intro/#should-i-migrate-to-es-modules.&lt;/A&gt; I&lt;SPAN&gt;f you use the AMD CDN without a JavaScript framework or local build tools, then there’s no need to migrate. The AMD modules will be available for the foreseeable future, and the AMD and ES modules have the same API capabilities.&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;Lastly, we have an ESM CDN that can be used for prototyping and testing-only. That might be a good place to start since you don't need node or npm. Here's a link to that sample application: &lt;A href="https://github.com/Esri/jsapi-resources/tree/master/esm-samples/jsapi-esm-cdn" target="_blank"&gt;https://github.com/Esri/jsapi-resources/tree/master/esm-samples/jsapi-esm-cdn&lt;/A&gt; and the source code is in that directory: &lt;A href="https://github.com/Esri/jsapi-resources/blob/master/esm-samples/jsapi-esm-cdn/esm-cdn.html" target="_blank"&gt;https://github.com/Esri/jsapi-resources/blob/master/esm-samples/jsapi-esm-cdn/esm-cdn.html&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 21:21:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1140083#M76240</guid>
      <dc:creator>AndyGup</dc:creator>
      <dc:date>2022-02-02T21:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: ESM Modules Broken - Error resolving module specifier “luxon”.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1140092#M76242</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/180"&gt;@AndyGup&lt;/a&gt;I will open a ticket, but it shouldn't be the solution as a user, it should work out of the box for something so basic?&lt;BR /&gt;&lt;BR /&gt;I'm looking to ESM as its best practice in ES6, and I do not like the scoping inherent to using require like so, its extremely cumbersome and makes scaling an application a cumbersome process.&lt;BR /&gt;&lt;BR /&gt;Does the below look user friendly or straightforward? Surely there MUST be a better way, hence the need for ESM&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;require(
    [
        "esri/Map",
        "esri/views/MapView",
        "esri/geometry/Polygon",
        "esri/Graphic",
        "esri/layers/GraphicsLayer",
        "esri/widgets/BasemapToggle",
        "esri/layers/WebTileLayer",
    ],
    (
        Map, MapView, Polygon, Graphic, GraphicsLayer,
        BasemapToggle, WebTileLayer
    ) =&amp;gt; {

// All code goes here

}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 22:05:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1140092#M76242</guid>
      <dc:creator>corndog</dc:creator>
      <dc:date>2022-02-02T22:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: ESM Modules Broken - Error resolving module specifier “luxon”.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1140110#M76243</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/180"&gt;@AndyGup&lt;/a&gt;&amp;nbsp; additionally the app I'm developing is for an intranet, so I need the files locally and not via a call to arcgis such as the below&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;script&lt;/SPAN&gt; &lt;SPAN&gt;src&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;A href="https://js.arcgis.com/4.22/" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.22/&lt;/A&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN&gt;script&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 02 Feb 2022 22:37:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1140110#M76243</guid>
      <dc:creator>corndog</dc:creator>
      <dc:date>2022-02-02T22:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: ESM Modules Broken - Error resolving module specifier “luxon”.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1140144#M76244</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384"&gt;@ReneRubalcava&lt;/a&gt;in the node example there is no index.html or anything to get an idea of how to build a webapp ...&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 00:28:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esm-modules-broken-error-resolving-module/m-p/1140144#M76244</guid>
      <dc:creator>corndog</dc:creator>
      <dc:date>2022-02-03T00:28:38Z</dc:date>
    </item>
  </channel>
</rss>

