Useful or not, from you.
angular-cli annotationCIs is not a constructor with @angular-devkit/build-angular 0.800.4

🐞 Bug report


I have an error and i've narrowed it down to "@angular-devkit/build-angular": "~0.800.4". It does not appear in previous versions.

When I run my project with ng serve I get this error:

Uncaught TypeError: annotationCls is not a constructor
    at core.js:909
    at (<anonymous>)
    at convertTsickleDecoratorIntoMetadata (core.js:905)
    at core.js:759
    at (<anonymous>)
    at ReflectionCapabilities._ownParameters (core.js:759)
    at ReflectionCapabilities.parameters (core.js:782)
    at JitReflector.parameters (platform-browser-dynamic.js:48)
    at CompileMetadataResolver._getDependenciesMetadata (compiler.js:19871)
    at CompileMetadataResolver._getTypeMetadata (compiler.js:19824)

The application does not initialize with this error. I'm unable to repro this as the project is quite big and I cannot find anything that is causing it.


I also get a new Circular dependency warning with this update that doesn't make sense in my opinion. I was able to resolve this one, but the error still persists.

That's a useful answer
Without any help

After a lot of trying to reproduce this issue, i found that it's was just a wrong import:

@Optional() private http: HttpClient,

where Optional was imported from

import { Optional } from 'ag-grid-community'; instead of import { Optional } from '@angular/core';

Just a bad autocomplete at the worst possible position as it didn't break anything.