Skip to content

Projects with Declaration=True in tsconfig will not run #1731

Closed
@randyaa

Description

@randyaa

OS?

Windows 7

Versions?

angular-cli: 1.0.0-beta.11-webpack.2
node: 6.3.1
os: win32 x64

Repro steps?

ng new projecta
ng g component ComponentXYZ
edit src/tsconfig.json & set "declaration": true,
ng serve / ng build

The log given by the failure?

When running ng serve the failure looks like:

Unhandled Promise rejection: Failed to load app.component.html ; Zone: <root> ; Task: Promise.then ; Value: Failed to load app.component.html

When running ng build the directory structure looks like:

dist
|   index.html
|   inline.js
|   inline.map
|   main.bundle.js
|   main.map
|   polyfills.bundle.js
|   polyfills.map
|
\---src
    |   main.d.ts
    |   polyfills.d.ts
    |
    \---app
        |   app.component.d.ts
        |   app.module.d.ts
        |   index.d.ts
        |
        +---component-xyz
        |       component-xyz.component.d.ts
        |
        \---environments
                environment.d.ts
                environment.dev.d.ts

Mention any other details that might be useful.

changing template references from

  templateUrl: 'app.component.html',

to

  templateUrl: './app/app.component.html',

seems to correct the issue but this doesn't seem right.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgenttype: bug/fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions