<?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: Sketch Widget Unable to Change Active Tool in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-unable-to-change-active-tool/m-p/1332147#M82311</link>
    <description>&lt;P&gt;Thanks for Stackblitz. I tried a few things and wasn't able to repro the prod build issue. Since it does runs locally, you'll need to dig deeper. Here are some recommendations.&lt;/P&gt;&lt;P&gt;- Run and compare 'npm list' on both dev and prod. Make sure both builds have the exact same dependency versions. A small difference in versions could be the cause of the problem, of course.&lt;/P&gt;&lt;P&gt;- Run a 'diff' against the main bundle files from both dev and prod. I understand some variable names may change, but try to decipher if there are substantive differences.&lt;/P&gt;&lt;P&gt;- Double check that the prod build is using the same bundler configurations.&lt;/P&gt;</description>
    <pubDate>Mon, 25 Sep 2023 20:01:05 GMT</pubDate>
    <dc:creator>AndyGup</dc:creator>
    <dc:date>2023-09-25T20:01:05Z</dc:date>
    <item>
      <title>Sketch Widget Unable to Change Active Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-unable-to-change-active-tool/m-p/1330391#M82252</link>
      <description>&lt;P&gt;I've been working with the Sketch Widget in my react app to try notify my app of changes in the activeTool. I was able to get this working locally using "watch" from reactiveUtils :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FlockSafety_0-1695155438389.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/81153iC4243F67155CF1FA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FlockSafety_0-1695155438389.png" alt="FlockSafety_0-1695155438389.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, when this gets deployed onto our dev &amp;amp; prod environments, we encounter the following error. I've tried removing all the custom handlers we tack into the props for "new GraphicsLayer(props)" and still encounter this error. Functionally, it prevents changing the active tool to anything other than the default.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FlockSafety_1-1695155569590.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/81154i2BDBDB861AEF65D9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FlockSafety_1-1695155569590.png" alt="FlockSafety_1-1695155569590.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This error appears to come from within the Sketch widget component. Can you provide guidance or troubleshooting steps to fix this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 20:34:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-unable-to-change-active-tool/m-p/1330391#M82252</guid>
      <dc:creator>FlockSafety</dc:creator>
      <dc:date>2023-09-19T20:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch Widget Unable to Change Active Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-unable-to-change-active-tool/m-p/1331172#M82277</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/618427"&gt;@FlockSafety&lt;/a&gt;&amp;nbsp; can you provide a simple repro sample? e.g. github, stackblitz, codesandbox. That error looks like it might be generated by webpack. However, you might also give it a try using our React/Vite sample to create a repro: &lt;A href="https://stackblitz.com/github/Esri/jsapi-resources/tree/main/esm-samples/jsapi-react?file=README.md" target="_blank"&gt;https://stackblitz.com/github/Esri/jsapi-resources/tree/main/esm-samples/jsapi-react?file=README.md&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 17:11:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-unable-to-change-active-tool/m-p/1331172#M82277</guid>
      <dc:creator>AndyGup</dc:creator>
      <dc:date>2023-09-21T17:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch Widget Unable to Change Active Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-unable-to-change-active-tool/m-p/1332010#M82300</link>
      <description>&lt;P&gt;Hey Andy, I was thinking it may be something in line with our build tooling locally vs when deployed. I'm not aware of any differences since they both use the same build scripts via craco.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I copied over the section of relevant code to the sample repo in Stackblitz that you linked. After getting it ported over, I noticed 2 things:&lt;/P&gt;&lt;P&gt;&lt;A href="https://stackblitz.com/edit/github-mj3nqv?file=src%2FCustomApp.jsx,src%2Fmain.jsx,src%2FApp.jsx" target="_blank" rel="noopener"&gt;https://stackblitz.com/edit/github-mj3nqv?file=src%2FCustomApp.jsx,src%2Fmain.jsx,src%2FApp.jsx&lt;/A&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The originally posted error does not occur. This is actually consistent with my experience locally, as I only experienced the issue when the code was deployed on a server.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Whenever I toggle a tool, it flickers to "null" for the pointer option. I have a console.log statement in the Stackblitz that writes the current tool. This isn't a big deal, but was a side observation I had while working on this prior to making this post&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;This is my first time using Stackblitz, so let me know if you have trouble viewing the posted code and I'll update it accordingly.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FlockSafety_0-1695653824847.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/81545i5B4247FCFF1A233A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FlockSafety_0-1695653824847.png" alt="FlockSafety_0-1695653824847.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 15:03:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-unable-to-change-active-tool/m-p/1332010#M82300</guid>
      <dc:creator>FlockSafety</dc:creator>
      <dc:date>2023-09-25T15:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch Widget Unable to Change Active Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-unable-to-change-active-tool/m-p/1332147#M82311</link>
      <description>&lt;P&gt;Thanks for Stackblitz. I tried a few things and wasn't able to repro the prod build issue. Since it does runs locally, you'll need to dig deeper. Here are some recommendations.&lt;/P&gt;&lt;P&gt;- Run and compare 'npm list' on both dev and prod. Make sure both builds have the exact same dependency versions. A small difference in versions could be the cause of the problem, of course.&lt;/P&gt;&lt;P&gt;- Run a 'diff' against the main bundle files from both dev and prod. I understand some variable names may change, but try to decipher if there are substantive differences.&lt;/P&gt;&lt;P&gt;- Double check that the prod build is using the same bundler configurations.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 20:01:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-unable-to-change-active-tool/m-p/1332147#M82311</guid>
      <dc:creator>AndyGup</dc:creator>
      <dc:date>2023-09-25T20:01:05Z</dc:date>
    </item>
  </channel>
</rss>

