i solved it from https://github.com/mendix/generator-mendix/issues/38
now it works
Find here a howto of mendix for pluggable widgets: https://docs.mendix.com/howto/extensibility/create-a-pluggable-widget-one
In the new generator, you should do something like yo @mendix/widget [widgetname]
Hope this helps!
Please make sure you create a new folder and start the command from within the folder. This folder has to be empty.