I have a thousands of this error after initial implementation nad typing in terminal ng serve my-app of and i can\'t resolve it. This is first time for me when i have problem li
Quick solution: Update package.json
"devDependencies": {
...
"typescript": "~3.7.4",
}
In tsconfig.json
{
...,
"angularCompilerOptions": {
...,
"disableTypeScriptVersionCheck": true
}
}
then remove node_modules folder and reinstall with
npm install
For more visit here
I had this error when i deleted several components while the server was on(after running the ng serve command). Although i deleted the references from the routes component and module, it didnt solve the problem. Then i followed these steps:
I've updated typescript
and tslint
versions and removed packages I wasn't using. This solved the problem for me.
As others pointed here, it seems to be an issue with different TypeScript versions where the generated typings from some library aren't compatible with your TypeScript version.
try
ng update @angular/core @angular/cli
Then, just to sync material, run:
ng update @angular/material
I was working on a fresh project and got the similar type of problem.
I just ran ng update --all
and my problem was solved.
I had this same issue, and these 2 commands saved my life. My underlying problem is that I am always messing up with global install and local install. Maybe you are facing a similar issue, and hopefully running these commands will solve your problem too.
ng update --next @angular/cli --force
npm install typescript@latest