Facing issue while using Customwidget in Dojotoolkit

Pls see the stackoverflow link, “https://stackoverflow.com/questions/59892521/facing-error-while-creating-custom-widget-in-dojo-could-not-identify-the-reason”.

Unfortunately no help from Stackoverflow

If anyone know the answer pls let me know.

This error generally occurs from attempting to parse a widget before you’ve loaded all of its dependencies and made sure the DOM is ready.

I would check the following:

In CustomPopup.js

  • Add a final dependency of “dojo/domReady!” in your list of dependencies (final dependency, as it doesn’t need a callback)
  • I’m not sure why you want dojo/parser in your list of dependencies within the widget itself. That shouldn’t be necessary

In your main.js or whatever is initiating the parsing:

  • Make sure you’re waiting for the DOM to be ready before parsing the page
  • Make sure the CustomPopup and its dependencies have loaded before parsing the page by requiring them in whatever define or require block loads your code before you run the parser.

You should never use id for dojo widgets.
Use data-dojo-attach-point instead