angular / angular-cli

CLI tool for Angular
https://cli.angular.io
MIT License
26.77k stars 11.97k forks source link

Cannot read property '0' of undefined #9589

Closed watzon closed 6 years ago

watzon commented 6 years ago

Versions

Angular CLI: 1.6.8
Node: 9.4.0
OS: linux x64
Angular: 5.2.4
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.6.8
@angular-devkit/build-optimizer: 0.0.42
@angular-devkit/core: 0.0.29
@angular-devkit/schematics: 0.0.52
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.8
@schematics/angular: 0.1.17
typescript: 2.5.3
webpack: 3.10.0

Repro steps

Observed behavior

➜ ng help generate
Cannot read property '0' of undefined
TypeError: Cannot read property '0' of undefined
    at Class.getCollectionName (/home/watzon/Projects/Personal/story-time/node_modules/@angular/cli/commands/generate.js:57:36)
    at Class.printDetailedHelp (/home/watzon/Projects/Personal/story-time/node_modules/@angular/cli/commands/generate.js:179:37)
    at commandFiles.forEach.cmd (/home/watzon/Projects/Personal/story-time/node_modules/@angular/cli/commands/help.js:57:38)
    at Array.forEach (<anonymous>)
    at Class.run (/home/watzon/Projects/Personal/story-time/node_modules/@angular/cli/commands/help.js:36:22)
    at resolve (/home/watzon/Projects/Personal/story-time/node_modules/@angular/cli/ember-cli/lib/models/command.js:261:20)
    at new Promise (<anonymous>)
    at Class.validateAndRun (/home/watzon/Projects/Personal/story-time/node_modules/@angular/cli/ember-cli/lib/models/command.js:240:12)
    at Promise.resolve.then.then (/home/watzon/Projects/Personal/story-time/node_modules/@angular/cli/ember-cli/lib/cli/cli.js:140:24)
    at <anonymous>

Desired behavior

It should list the command specific help for generate

Mention any other details that might be useful (optional)

I tracked down the issue to here.

Brocco commented 6 years ago

Duplicate of #9412

Closing.

angular-automatic-lock-bot[bot] commented 5 years ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.