Questions tagged [angular-ivy]

Ivy is the code name for Angular's next-generation compilation and rendering pipeline. Use this tag for Angular questions which are specific to only the rendering engine.

Ivy is the code name for Angular's next-generation compilation and rendering pipeline. With the version 9 release of Angular, the new compiler and runtime instructions are used by default instead of the older compiler and runtime, known as View Engine.

213 questions
119
votes
12 answers

Want to upgrade project from Angular v5 to Angular v6

As Angular 6 is here, I want to upgrade or move my angular 5 client application to angular 6, but I'm not getting any tutorial or anything which can guide me through. According to me I just need to run a new Angular CLI and then have to move my…
Abhishek Chokra
  • 1,381
  • 2
  • 9
  • 17
49
votes
3 answers

What do I need to cache in my CI job to avoid ngcc recompiling each time?

With angular 9 and it's new compilation engine IVY, my CI build times have increased substantially. This is of course is because ngcc is ran on many modules. e.g. Compiling @angular/core : es2015 as esm2015 Compiling @angular/common : es2015 as…
45
votes
4 answers

Jasmine Angular 9 test failing because 'unreachable' stack trace at injectableDefOrInjectorDefFactory

I created an Angular application under 4. I have migrated from version to version and am currently latest version 9. I was reviewing my tests. I have a Login component that I had 3 working tests and now all are failing. It is now returning the…
Phil Huhn
  • 3,307
  • 3
  • 18
  • 35
44
votes
1 answer

Why entryComponents is not necessary anymore in Angular 9/ivy compiler?

Can anyone give a clear explanation of why in the IVY compiler, entry components API Is not necessary anymore?. In other words what was change internally so that Angular suddenly doesn't need a heads up that you are going to create component…
Ariel Henryson
  • 1,316
  • 1
  • 10
  • 13
43
votes
3 answers

Angular Ivy strictTemplates true Type 'boolean | null' is not assignable to type 'boolean'

I've updated my app to 9 version. Everything is alright but I've problem with strictTemplates set to true. For instance this code loaded$: Observable [loaded]="loaded$ | async" @Input() loaded!: boolean; I've got the error Type 'boolean |…
user3887366
  • 2,226
  • 4
  • 28
  • 41
24
votes
6 answers

angular 13 ng build library fails (ivy partial compilation mode)

Recently I was having a problem installing an npm package (that used node-gyp). I tried upgrading the minor version of node from version 16.13.0 to 16.13.1 and upgrading my angular cli from 13.0.2 to 13.2.0. Once I got the package to install I…
afriedman111
  • 1,925
  • 4
  • 25
  • 42
24
votes
5 answers

Angular 9 "Error: This constructor was not compatible with Dependency Injection."

This weird error, that I don't remember seeing pre-Ivy, has popped up in the setup of a new app created with the latest Angular 9 CLI. Looks like it could be a bug with Ivy? Any ideas on how to fix would be greatly appreciated. Error result from ng…
Andrew
  • 1,406
  • 1
  • 15
  • 23
23
votes
13 answers

This constructor is not compatible with Angular Dependency Injection because its dependency at index 0 of the parameter list is invalid

In my Angular 9 app, I have an abstract class: export abstract class MyAbstractComponent { constructor( protected readonly cd: ChangeDetectorRef, ) { super(); } // ... } and a Component extending it: @Component({ // ... }) export…
21
votes
5 answers

TypeError: angularCompiler.getNextProgram is not a function

I'm using angular 11.2 in my machine and I want to run a angular 12 project. After clone from git, I ran below commands. npm install ng serve But I got below errors and can't run the project. I read this question but it not worked for me. Error:…
19
votes
2 answers

Value at position 0 while updating from Angular 8 to 9

I was updating my project from Angular 8 to 9 when after following the update guide (+ running npm update) on update.angular.io and trying to compile the website using ng serve I get the following error: ERROR in Failed to compile entry-point…
Munchkin
  • 857
  • 5
  • 24
  • 51
18
votes
2 answers

Angular 10 Libraries and IVY/ngcc Compatibility

I have a library that needs to be distributed via npm. The recommendation for Angular 10 still seems to be that such libraries should be compiled with IVY disabled but that the Angular CLI will ensure that the library is still compatible with an…
Matthew Dolman
  • 1,732
  • 7
  • 25
  • 49
15
votes
4 answers

Angular / Ivy error : Error: Token InjectionToken XXXXXXXXX is missing a ɵprov definition

Getting the error after updating to Angular 9 / Ivy compiler ERROR Error: Token InjectionToken XXXXXXXXX is missing a ɵprov definition. at injectableDefOrInjectorDefFactory (vendor.js:47105) at providerToFactory (vendor.js:47210) at…
Simon_Weaver
  • 140,023
  • 84
  • 646
  • 689
13
votes
6 answers

Cannot combine @Input decorators with query decorators using Ivy

I have migrated my angular 7 app to 8.0.0 and i'am now trying the new compiler ivy. The app works perfectly without ivy but when i try to compile with it i have the following error : Cannot combine @Input decorators with query decorators No line…
grunk
  • 14,718
  • 15
  • 67
  • 108
12
votes
6 answers

error NG6002: Appears in the NgModule.imports of , but could not be resolved to an NgModule class

I just updated from Angular 8.2 to 9. Everything works well if I disable ivy, but when it's enabled I'm getting a lot of errors that seems to be kind of obscure, at least I can't find any results when googling it. I'm quite sure I've done everything…
raouaoul
  • 681
  • 2
  • 13
  • 33
12
votes
1 answer

What does Angular Ivy specifically allow us to do in regards to manual change detection?

This article mentions that Ivy opens a few possibilities for the future though. It should now be possible to run an application without zone.js, and to semi-manually handle change detection (a bit like you would with React). These APIs already…
Maxime Dupré
  • 5,319
  • 7
  • 38
  • 72
1
2 3
14 15