The module command works only local at the moment. This means you need to install the module local. Also there is no module distribution in domain mode.
It might be come in a future release.
in addition to what Wolf wrote, I'd like to add that it is actually possible to create new modules in domain mode (local domains only) but you have to work in disconnected mode.
Hope it helps
Is there a bug I can track to see when this does get added to Wildfly?