on node module, @mendix folder, find rollup.config.js change onwarn with
onwarn(warning, warn) { if (warning.code === 'MODULE_LEVEL_DIRECTIVE') { return
}
warn(warning)
}
Then you can build the widget
Do as Quang said,And I can build the widget
Me too ~ so many error~
I meet this error too