Update: If you read through you will find that renaming widgets was the issue.
Up to now I have been working with Dev Edition v1.1 and wanted to try migrating to v1.3. When I ran into trouble, I tried migrating to v1.2 where I did not encounter this error:
My project has 2 custom widgets that I developed, but only one of them fails. A third widget that also fails is simply a copy of the argis-map widget that I renamed and made a few changes in mapbase.tsx to disable all navigation (replacing/enhancing the functionality of the disable zoom scrolling option). All 3 custom widgets worked correctly in v1.3 when I tested them in a new ExB project. Again, I have no problems migrating to v1.2.
I also see errors in the server command window:
Any thoughts regarding this would be appreciated.
Solved! Go to Solution.
Yes, the widgets are in the dist folder. This is what it looks like if I copy and paste the URL in a new tab:
This is what it looks like when I Preview the app:
Could you try to create a new experience from scratch and try to add your own widget inside ?
It may give some leads on what is failing ?
Thanks, Alexis, as stated in the original post I have tried that:
All 3 custom widgets worked correctly in v1.3 when I tested them in a new ExB project.
This showed up now too:
The NODE_TLS_UNAUTHRIZED error may be a hint that CORS needs to be enable. Hopefully I will hear back from IT about getting privileges set back to where there were so I can do that. A new error has cropped up:
Thank you, Junshan. To differentiate the names between the widgets for this Experience from the ones for an Experience that followed, I renamed the widgets. This was a long while back. When I tested the projects in v1.1, everything worked fine. I made changes and redeployed the Experience multiple times - but made no changes to the custom widgets. It seems to me that the reason the widgets continued to work is that after I renamed the widgets there were functioning orphans in the client\dist\widgets directory.
So I guess the question now becomes: "Is there a way to rename widgets and fix Experiences that reference them?"
As you say, the config.json file in server\src\public\apps\5 did not have the correct widget names. I updated them, but it still didn't work. I then found the config.json file in server\src\public\apps\5\resources\config and updated it. This did the trick.
So from what I have seen so far, it seems that after renaming a widget, you should:
1. Delete the orphan in client\dist\widgets.
2. Change all references to the name of the widget in server\src\public\apps\[#]\config.json and server\src\public\apps\[#]\config.json.
To change a widget name, you need to:
1. Stop webpack in client
2. Change the folder name
3. Change the name in manifest.json
4. Change the reference in apps/#/config.json and apps/#/resource/config.json (one config is for published version, one config is for draft version)
5. Start webpack