inject() must be called from an injection context Angular Nx

160 views Asked by At

update version 14 to 16 Nx app route not working Error: NG0203: inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with

update version 14 to 16 Nx app route not working

1

There are 1 answers

1
Matthieu Riegler On

NG0203 typically happens when you have more than 1 instance of @angular/core in your app.

run npm ls @angular/core to see this and find the culprit.