<?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: ES modules via NPM build error &amp;quot;Can't resolve 'process/browser'&amp;quot; in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/es-modules-via-npm-build-error-quot-can-t-resolve/m-p/1076956#M73779</link>
    <description>&lt;P&gt;I don't use PowerBI and I'm unfamiliar with building it. The node polyfills have caused issues with the wasm in the API in the past, but I haven't seen this with the ESM package. Tough to tell without building it.&lt;/P&gt;&lt;P&gt;On the second issue, it looks like that build is copying assets locally. You no longer are required to do this for local builds using the API, as all assets will be loaded from the CDN, so you can remove that copy logic from your build. I assume if esri-loader is no issue, this application doesn't need the assets locally.&lt;/P&gt;&lt;P&gt;If the PowerBI build causes limitations with the ESM build, this is one of the scenarios we recommend esri-loader for, as it basically runs sandboxed from the main application.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jul 2021 19:44:00 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2021-07-08T19:44:00Z</dc:date>
    <item>
      <title>ES modules via NPM build error "Can't resolve 'process/browser'"</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/es-modules-via-npm-build-error-quot-can-t-resolve/m-p/1029427#M71839</link>
      <description>&lt;P&gt;While building my project using webpack, I keep getting the following error&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="esri-help.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/6638iF083DEE7AF412466/image-size/medium?v=v2&amp;amp;px=400" role="button" title="esri-help.png" alt="esri-help.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have tried finding the issue online, but haven't seen anything similar, so I assume there is a fix for this...&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 04:22:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/es-modules-via-npm-build-error-quot-can-t-resolve/m-p/1029427#M71839</guid>
      <dc:creator>ENGEOGIS1</dc:creator>
      <dc:date>2021-02-23T04:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: ES modules via NPM build error "Can't resolve 'process/browser'"</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/es-modules-via-npm-build-error-quot-can-t-resolve/m-p/1029722#M71843</link>
      <description>&lt;P&gt;Can you post more details? A sample repro to test? Can you check your app against the sample app&amp;nbsp;&lt;A href="https://github.com/Esri/jsapi-resources/tree/master/esm-samples/webpack" target="_blank"&gt;https://github.com/Esri/jsapi-resources/tree/master/esm-samples/webpack&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 20:10:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/es-modules-via-npm-build-error-quot-can-t-resolve/m-p/1029722#M71843</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-02-23T20:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: ES modules via NPM build error "Can't resolve 'process/browser'"</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/es-modules-via-npm-build-error-quot-can-t-resolve/m-p/1076650#M73772</link>
      <description>&lt;P&gt;We have the same issue when we develop with ArcGIS JS API ES Modules for custom Microsoft powerBI plugins.&lt;/P&gt;&lt;P&gt;We use this tool from Microsoft&amp;nbsp;&lt;A href="https://github.com/microsoft/PowerBI-visuals-tools" target="_blank" rel="noopener"&gt;https://github.com/microsoft/PowerBI-visuals-tools&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This tool is a cli to create powerBI plugins based on a template. Microsoft uses webpack to build the powerBI plugin.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In their webpack config (webpack version 5), they have this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;new webpack.ProvidePlugin({
 $: 'jquery',
 jQuery: 'jquery',
 Buffer: ["buffer", "Buffer"],
 process: "process/browser"
}),&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When we remove line 5: "process: "process/browser", we can build but then we have other CORB issues.&lt;/P&gt;&lt;P&gt;Everything is working fine when we use the &lt;A href="https://github.com/Esri/esri-loader" target="_self"&gt;esri-loader&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;I will provide further info if we found a solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Update: Second issue seems related with this&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Developer/Including-External-Assets-in-Custom-Visual-Assets-folder-ArcGIS/m-p/1655065" target="_self"&gt;https://community.powerbi.com/t5/Developer/Including-External-Assets-in-Custom-Visual-Assets-folder-ArcGIS/m-p/1655065&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 11:18:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/es-modules-via-npm-build-error-quot-can-t-resolve/m-p/1076650#M73772</guid>
      <dc:creator>MichailMarinakis1</dc:creator>
      <dc:date>2021-07-08T11:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: ES modules via NPM build error "Can't resolve 'process/browser'"</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/es-modules-via-npm-build-error-quot-can-t-resolve/m-p/1076956#M73779</link>
      <description>&lt;P&gt;I don't use PowerBI and I'm unfamiliar with building it. The node polyfills have caused issues with the wasm in the API in the past, but I haven't seen this with the ESM package. Tough to tell without building it.&lt;/P&gt;&lt;P&gt;On the second issue, it looks like that build is copying assets locally. You no longer are required to do this for local builds using the API, as all assets will be loaded from the CDN, so you can remove that copy logic from your build. I assume if esri-loader is no issue, this application doesn't need the assets locally.&lt;/P&gt;&lt;P&gt;If the PowerBI build causes limitations with the ESM build, this is one of the scenarios we recommend esri-loader for, as it basically runs sandboxed from the main application.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 19:44:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/es-modules-via-npm-build-error-quot-can-t-resolve/m-p/1076956#M73779</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-07-08T19:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: ES modules via NPM build error "Can't resolve 'process/browser'"</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/es-modules-via-npm-build-error-quot-can-t-resolve/m-p/1077359#M73801</link>
      <description>&lt;P&gt;Thanks for the reply Rene.&lt;/P&gt;&lt;P&gt;I went down the rabbit hole &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;. So apparently Microsoft has a webpack plugin for powerBI customizations here:&amp;nbsp;&lt;A href="https://github.com/microsoft/powerbi-visuals-webpack-plugin" target="_blank" rel="noopener"&gt;https://github.com/microsoft/powerbi-visuals-webpack-plugin&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I combine it with the&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-webpack-plugin" target="_blank" rel="noopener"&gt;https://github.com/Esri/arcgis-webpack-plugin&lt;/A&gt;. The nice thing is that the arcgis webpack plugin worked, even in this context!&amp;nbsp;I set the&amp;nbsp;&lt;SPAN&gt;esriConfig&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;assetsPath&amp;nbsp;&lt;/SPAN&gt;properly. It almost seemed that it would work.&lt;/P&gt;&lt;P&gt;Unfortunately I reached some node heap out of memory issues (easy to solve) and some other weird errors and I stopped there.&lt;/P&gt;&lt;P&gt;I truly believe that somehow it would work. If I have some extra time in the future, I will try again.&lt;/P&gt;&lt;P&gt;After all these, we will go for esri-loader.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 17:24:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/es-modules-via-npm-build-error-quot-can-t-resolve/m-p/1077359#M73801</guid>
      <dc:creator>MichailMarinakis1</dc:creator>
      <dc:date>2021-07-09T17:24:56Z</dc:date>
    </item>
  </channel>
</rss>

