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 made the bonehead mistake of importing MatSnackBar
instead of MatSnackBarModule
in app.module.ts
.
Work for me
angular.json
"aot": false
Just go to your tsconfig.app.json in your project and remove all from it
and copy below code and paste it. It will solve your issue :)
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": [],
},
"files": [
"src/main.ts",
"src/polyfills.ts"
],
"include": [
"src/**/*.d.ts"
],
"angularCompilerOptions": {
"enableIvy": false
}
}
For me I was working under Ubuntu
The error disappeared if I use sudo with ng
sudo ng build
sudo ng serve
I had this error message because I was trying to import a component in a new module instead of importing the other module where my component was declared.
Removing the component import from my new module and importing the other module solved it for me.
Just restarting the server with command npm start
did the trick. Thanks all for the suggestions.