Skip to content

ng cli adding component breaks app.module.ts #7851

Closed
@bownie

Description

@bownie

Bug Report or Feature Request (mark with an x)

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

Versions.

@angular/cli: 1.4.1
node: 8.5.0
os: darwin x64
@angular/animations: 4.3.6
@angular/cdk: 2.0.0-beta.10
@angular/common: 4.3.6
@angular/compiler: 4.3.6
@angular/core: 4.3.6
@angular/forms: 4.3.6
@angular/http: 4.3.6
@angular/material: 2.0.0-beta.10
@angular/platform-browser: 4.3.6
@angular/platform-browser-dynamic: 4.3.6
@angular/router: 4.3.6
@angular/cli: 1.4.1
@angular/compiler-cli: 4.3.6
@angular/language-service: 4.3.6
typescript: 2.3.4

Repro steps.

From base of angular app:

$ ng g c loginDetails

Adds the sub folder but breaks the app.module.ts

The log given by the failure.

Failed to compile.

/Users/richardbown/xyglo-device-control/src/app/app.module.ts (32,37): Unterminated string literal.

Desired functionality.

Adds component correctly. Also not generated index.ts - is this a requirement?

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentneeds: investigationRequires some digging to determine if action is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions