"Environment" is not defined when using custom widget
I created a simple custom widget, simply starting a new widget and downloading it with the default scrips and properties. When I run my process and the form should be displayed containing this widget, I get this error:
Error ReferenceError: "Environment" is not defined.
What's wrong and how to solve it?
The full error text is attached.