<?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: Unable to import symbolUtils in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-import-symbolutils/m-p/1261828#M80385</link>
    <description>&lt;P&gt;Thanks a lot! That solved it.&lt;BR /&gt;(I thought I had tried that as well, but that threw another error. I must have made a mistake. My apologies and thanks a lot for the quick reply!)&lt;/P&gt;</description>
    <pubDate>Sun, 26 Feb 2023 08:47:45 GMT</pubDate>
    <dc:creator>V-LabsSA</dc:creator>
    <dc:date>2023-02-26T08:47:45Z</dc:date>
    <item>
      <title>Unable to import symbolUtils</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-import-symbolutils/m-p/1261806#M80381</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I recently installed ES modules of ArcGIS Javascript SDK (v4.25) through npm install &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/642472"&gt;@ArcGIS&lt;/a&gt;/core and I am trying to import the symbolUtils.js module into my js code:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import symbolUtils from '@arcgis/core/symbols/support/symbolUtils.js';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;Unfortunately, I am getting the following error message and I haven't been able to find a solution:&lt;/P&gt;&lt;P&gt;import symbolUtils from '@arcgis/core/symbols/support/symbolUtils.js';&lt;BR /&gt;^^^^^^^^^^^&lt;BR /&gt;SyntaxError: The requested module '@arcgis/core/symbols/support/symbolUtils.js' does not provide an export named 'default'&lt;BR /&gt;at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)&lt;BR /&gt;at async ModuleJob.run (node:internal/modules/esm/module_job:189:5).&lt;/P&gt;&lt;P&gt;Does anybody know why this happens? Or is it a bug?&lt;/P&gt;&lt;P&gt;Through ADM, the following code seems to work (but I prefer to use an ES module):&lt;/P&gt;&lt;DIV&gt;&lt;DIV&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.25/" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.25/&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;&lt;SPAN&gt;&amp;lt;script&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;require&lt;/SPAN&gt;&lt;SPAN&gt;([&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"esri/symbols/support/symbolUtils"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ], &lt;/SPAN&gt;&lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;symbolUtils&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;});&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any help would be really appreciated. Thanks!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 25 Feb 2023 20:01:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-import-symbolutils/m-p/1261806#M80381</guid>
      <dc:creator>V-LabsSA</dc:creator>
      <dc:date>2023-02-25T20:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to import symbolUtils</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-import-symbolutils/m-p/1261808#M80382</link>
      <description>&lt;P&gt;That error means the module doesn't have a "export default something", so you can import the individual methods or all of them using "*".&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import * as symbolUtils from "@arcgis/core/symbols/support/symbolUtils.js";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The import syntax is shown in the doc here.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Feb 2023 21:10:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-import-symbolutils/m-p/1261808#M80382</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2023-02-25T21:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to import symbolUtils</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-import-symbolutils/m-p/1261828#M80385</link>
      <description>&lt;P&gt;Thanks a lot! That solved it.&lt;BR /&gt;(I thought I had tried that as well, but that threw another error. I must have made a mistake. My apologies and thanks a lot for the quick reply!)&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2023 08:47:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-import-symbolutils/m-p/1261828#M80385</guid>
      <dc:creator>V-LabsSA</dc:creator>
      <dc:date>2023-02-26T08:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to import symbolUtils</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-import-symbolutils/m-p/1261833#M80386</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I was wondering how I could have missed your solution beforehand, because I had carefully read the provided syntax from ESRI.&lt;/P&gt;&lt;P&gt;However, using the syntax provided by ESRI gives me the following error:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Uncaught ReferenceError ReferenceError: ResizeObserver is not defined at &amp;lt;anonymous&amp;gt; (&lt;/SPAN&gt;&lt;A target="_blank"&gt;...\node_modules\&lt;/A&gt;&lt;SPAN&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/642472"&gt;@ArcGIS&lt;/a&gt;\core\widgets\support\widgetUtils.js:5:1462) at &amp;lt;anonymous&amp;gt; (&lt;/SPAN&gt;&lt;A target="_blank"&gt;...\node_modules\&lt;/A&gt;&lt;SPAN&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/642472"&gt;@ArcGIS&lt;/a&gt;\core\widgets\support\widgetUtils.js:5:1662) at run (internal/modules/esm/module_job:193:25)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2023 11:21:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-import-symbolutils/m-p/1261833#M80386</guid>
      <dc:creator>V-LabsSA</dc:creator>
      <dc:date>2023-02-26T11:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to import symbolUtils</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-import-symbolutils/m-p/1602351#M86809</link>
      <description>&lt;P&gt;Im having the same issue. However I am trying to call a function from a unit test and all my function does is do the authentication. And when my code goes to load&amp;nbsp;&lt;SPAN&gt;IdentityManager I get this error. Why would calling&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;IdentityManager give me a widgetUtils error?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 14:53:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-import-symbolutils/m-p/1602351#M86809</guid>
      <dc:creator>DonParkison_charter</dc:creator>
      <dc:date>2025-04-03T14:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to import symbolUtils</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-import-symbolutils/m-p/1602410#M86810</link>
      <description>&lt;P&gt;Unit tests and SSR are run in node, so you need to handle those use cases when using parts of the JS Core that use UI.&lt;/P&gt;&lt;P&gt;In unit tests, you will need to set up mocks for your modules that use JS Core widgets/views. Or maybe have some factory methods you can mock.&lt;/P&gt;&lt;P&gt;In SSR, you can try to move all UI modules to a helper module that can exposes a function that can take the containers for your views and widgets. Then you can dynamically load this module via `import("./helper.js")`. This will avoid the SSR issues.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 16:33:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-import-symbolutils/m-p/1602410#M86810</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2025-04-03T16:33:32Z</dc:date>
    </item>
  </channel>
</rss>

