Skip to content

Small bug: "Cannot read property '0' of null" #12950

@DmitriyIvanko

Description

@DmitriyIvanko

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [x] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

Node,js 8.11.4
npm 5.6.0
Angular: 7.0.3

Repro steps

  1. Generate new project ("Tour of Heroes: for example);
  2. Remove leading whitespaces in AppModule declaretions:
    screenshot_3
  3. Try add any component: "ng g c foobar"

The log given by the failure

Console throw an error:
"Cannot read property '0' of null"

Desired functionality

No error;

Mention any other details that might be useful

It is easy reproduce for any Angular ClL Project. Like Quickstart example:
https://angular.io/guide/quickstart

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions