First time using firestore and I\'m getting this error. It seems to be a problem with Ivy, from my research. I don\'t have a lot of experience modifying tsconfig.app.json, w
I got this error when I added the service class. I was using Angular 9 Went for several solutions, nothing helped me to resolve this issue. If U tried everything make sure u added ng module reference in core lib inside service. See Img
Restarting your server may not work always. I have got this error when I imported MatFormFieldModule.
In app.module.ts, I have imported MatFormField instead of MatFormFieldModule which lead to this error.
Now change it and restart the server, Hope this answer helps you.
I have faced the same issue in Ubuntu because the Angular app directory was having root
permission. Changing the ownership to the local user solved the issue for me.
$ sudo -i
$ chown -R <username>:<group> <ANGULAR_APP>
$ exit
$ cd <ANGULAR_APP>
$ ng serve
This issue will be fixed by adding the postinstall
script below in your package.json
.
It will be run after a npm install.
"scripts": {
"postinstall": "ngcc"
}
Post adding the above code, run npm install
This works for me when upgrading to Angular 9+
This error shows when you add component declaration in imports: []
instead of declarations: []
, e.g:
declarations: [
AppComponent,
],
imports: [
BrowserModule,
AppRoutingModule,
SomeComponent <-----------wrong
],
In Your "tsconfig.app.json" Add Following Lines
"angularCompilerOptions": { "enableIvy": false }
Where to add? Just After Following Lines Of Code "exclude": ["src/test.ts", "src/**/*.spec.ts"],