The following widgets will not work in a production environment. Please update them.

4
The widget that causes this issue, is brand new, freshly created by Yeoman, and I added 1 folder in the lib folder. I can't find the issue here and I'm stuck. After adding gesture from dojox, I get the error BUT when I check the build-report.txt I don't see any errors: Process finished normally errors: 0 warnings: 64 build time: 3.984 seconds We cannot deploy a production system because of this. The project runs fine if you uncheck "Bundle widgets when running locally"
asked
2 answers
2

Tick the 'Bundle.. ' option

Apply this answer

Run your project

Check the file deployment/data/tmp/dojo/build-report.txt and look for errors.

answered
1
error(311) Missing dependency.
module: SwipeContainers/widget/SwipeContainers; dependency: dojox/gesture/Base
module: SwipeContainers/widget/SwipeContainers; dependency: dojox/gesture/swipe

But in the JS file, the module is registered:

dojo.registerModulePath('dojox', '/widgets/SwipeContainers/lib/dojox');

I'm guessing it fails because Mendix already has a dojox and Grunt isn't taking this line into account before I import the dependencies.

This means instead of using 'dojox/..' I should be using 'WidgetName/lib/dojox/..', but then I need to change every single JS file in lib/dojox to import/require the new path of dojox. Not a great solution though. Either grunt needs to be aware of registed modules or at the very least Mendix should package the rest of dojox

answered