Recently I removed EB DE 1.15 from my development server and deployed 1.16. When I run npm ci, npm fund, then npm start, I get the below results of saying the widget name is duplicated. I went to update the widget.tsx in one of the widgets, but the updates are not pushing through into the widget itself. I am missing some steps about migrating widgets from one version of EB DEV to another. I did copy and paste the widgets from the 1.15 to 1.16 file path...\ArcGISExperienceBuilder\client\your-extensions\widgets folder. Instead of editing the code in file path...\ArcGISExperienceBuilder\client\your-extensions\widgets, should I be editing the code in file path...\ArcGISExperienceBuilder\client\dist\widgets?
One thing I would check after changing versions, is ensure you are starting everything fresh. (May or may not need a cache clear)
It's my understanding that what ends up in DIST is not always the same as what is in your-extensions/widgets/foldername (Often its reduced to a single .js file)
if you have a message about a duplicate widget, double check the manifest.json file most often its the name key that needs adjusted.
Thank you @TimWestern. If I change the name of the widget folder in ...ArcGISExperienceBuilder\client\your-extensions\widgets\mapswitcher and the name in the manifest.json for each widget, it works. However, existing applications created in DE break the widgets and require them all to be reconfigured because of the name change. I did clear the cache on the client and server folder by running npm cache clean --force, which did not seem to change anything for this issue.
oh yeah, folder name not matching is so easy to miss. I forgot to mention that one. It's bit me on several occasions.
Yeah, the reconfigure problem is the unfortunate side effect of how this works. Its not always immediately obvious that a widget name change is the issue either. One way to avoid this, is you could in theory just change the label that appears in the EXB Pallet, rather than the folder of the widget itself, so it would display with a new name and not break that change.
btw, I've experienced additional headaches on enterprise, where a widgets folder hosted somewhere, loaded by Enterprise won't always sense the updated copy (its like the widget is stuck in cache in session somewhere).
I had to remove the folder where the widget was.
Then go to edit the experience in AGE, remove the widget, save and publish
load the view from portal to verify it was gone
Then copy the new custom widget folder back in to the same location
Go back to edit the experience in AGE, add and configure the widget again.
Save and publish the experience
Reload the Experience from View
Hit F12 to open Dev Tools
Hold left click over the refresh button and choose:
Empty Cache and hard reload, for me since my widget isn't on the first screen I did it on the screen it appears too, and finally got the changes to show up.
If you upgrade, and find weird things with the widgets, the way the host of the widgets itself handles caching may be playing a role also.
I think it was my order of operations. During my first attempt, I updated version 1.16 and then imported the application ZIPS from 1.15 to 1.16. The second time, I did a fresh install of 1.16 and then copied the widgets into the ArcGISExperienceBuilder\client\your-extensions\widgets\ folder. After that, I imported the application ZIPS from an export from 1.15.