Is it written in Dojo (Custom widget) or React (Pluggable widget)?
I have encountered this error many times writing a Dojo widget. You have to be sure you are importing the library in the correct manner with AMD. Please verify if that is the case.
Next to that Mendix bundles it’s widgets whilst deploying with webpack, clustering all widgets in one file. If your widget is referencing some global variable also defined in another widget you can encounter the multiDefine error. I have experienced this many times because multiple widgets were loading the jQuery library and defining the jQuery variable $ multiple times.
EDIT: Since you are using Dojo, I would suggest to try and solve your problem in the following manner
Sadly the build-report is not optimal and finding an error can be quite cumbersome, let alone fix it. In my experience it is then best to check any other properly build widget using complex external libraries. Heaps of these can be found in the AppStore. See specifically the beginning part of the JavaScript library file.
Good luck!