Skip to content

[1.5.0-rc.5] AoT error reporting is flaky #8228

@cexbrayat

Description

@cexbrayat

Bug Report or Feature Request (mark with an x)

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

Versions.

Angular CLI: 1.5.0-rc.5
Node: 8.7.0
OS: darwin x64
Angular: 5.0.0-rc.7
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

@angular/cli: 1.5.0-rc.5
@angular-devkit/build-optimizer: 0.0.31
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.34
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0-rc.5
@schematics/angular: 0.0.48
typescript: 2.4.2
webpack: 3.8.1

Repro steps.

Build a simple component with a template like:

<div>{{ ponyModel.name }}</div>

and serve the app with ng serve

As with 1.5.0-rc.5, AoT is now the default mode, so changing the template to

<div>{{ p.name }}</div>

breaks the compilation with:

ERROR in Error at ERROR in Error at /Users/cedric/Code/ninjasquad/formation/Angular2/ponyracer/src/app/pony/pony.component.html(3,15): Property 'p' does not exist on type 'PonyComponent'.

ERROR in Error at /Users/cedric/Code/ninjasquad/formation/Angular2/ponyracer/src/app/pony/pony.component.html(3,15): Property 'p' does not exist on type 'PonyComponent'.

Note that the error is displayed twice.

But if you fix the issue, the error sticks around in the console, only once this time.

Sadly, breaking the template in another way will not be picked up by the CLI, as it will only display the old error, twice again. It won't work until ng serve is relaunched.

Metadata

Metadata

Assignees

Labels

P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfultype: bug/fix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions