Skip to content

Inconsistent results from "ng build --watch" #12311

Closed
@TimWebb

Description

@TimWebb

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
- [x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

~/Development/test-fromdev/angularcli622 (master)
$ node --version
v10.10.0

~/Development/test-fromdev/angularcli622 (master)
$ npm --version
6.4.1

~/Development/test-fromdev/angularcli622 (master)
$ ng --version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 6.2.2
Node: 10.10.0
OS: darwin x64
Angular: 6.1.7
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.8.2
@angular-devkit/build-angular     0.8.2
@angular-devkit/build-optimizer   0.8.2
@angular-devkit/build-webpack     0.8.2
@angular-devkit/core              0.8.2
@angular-devkit/schematics        0.8.2
@angular/cli                      6.2.2
@ngtools/webpack                  6.2.2
@schematics/angular               0.8.2
@schematics/update                0.8.2
rxjs                              6.2.2
typescript                        2.9.2
webpack                           4.19.1

Repro steps

In short:

  1. ng new
  2. Modify export class AppComponent in app.component.ts and make the name have an error
  3. ng build --watch
  4. Results do not include complete errors
  5. Modify a file and save it
  6. Results get different results

screen shot 2018-09-19 at 10 03 06 am

The log given by the failure

Date: 2018-09-19T16:23:50.988Z
Hash: c698bdcfe9b051ff11cf
Time: 3469ms
chunk {main} main.js, main.js.map (main) 640 bytes [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 695 bytes [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.22 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 15.6 kB [initial] [rendered]

ERROR in AppComponent cannot be used as an entry component.

Desired functionality

Correctly report details on the file with errors. We were tying in Angular CLI build with VS Code tasks support to get 'authoritative' project-level validation and ideally need consistent reporting of errors (and bonus would be "begin compile" / "end compile" designators).

Mention any other details that might be useful

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions