When you're invocating a module that doesn't exist in a wiki, you get the aforementioned error which gives you a JavaScript popup. It would be good if it also gave you the possibility of creating that module with a redlink.
This behavior already happens with missing templates.
More details: Mediawiki discussion