Select command as follows:
Command+Shift+P
Type: ng generate and press Enter
Select module
Press Escape
The command still executes with the value "undefined" and creates a module called "undefined"
vscode: 1.18.1
vsc-angular-cli: 1.0.0
angular-cli: 1.2.6
node: 8.4.0