This is my angular version 8.2.14 and my angular CLI version is 6.2.9.
I need to downgrade the angular version to 6.1.9 or something to 6
Because I'm getting this error when I run ng serve
Right now this is the version
This is my angular version 8.2.14 and my angular CLI version is 6.2.9.
I need to downgrade the angular version to 6.1.9 or something to 6
Because I'm getting this error when I run ng serve
Right now this is the version
I think it is simpler and better to update angular CLI.
npm uninstall -g angular-cli
npm cache clean or npm cache verify #(if npm > 5)
npm install -g @angular/cli@latest
More info how to update angular CLI to newest version
But if you want install older version of angular you should change all angular packages in package.js
and then remove node_modules
directory and run npm install
or yarn install
(if you are using yarn).
I don't know what package you are using but it should look like this (change all packages with @angular
on name):
"@angular/animations": "^6.0.0",
"@angular/cdk": "^6.0.0",
"@angular/common": "^6.0.0",
"@angular/compiler": "^6.0.0",
"@angular/compiler-cli": "^6.0.0",
"@angular/core": "^6.0.0",
"@angular/flex-layout": "^6.0.0",
"@angular/forms": "^6.0.0",
"@angular/http": "^6.0.0",
"@angular/material": "^6.0.0",
"@angular/platform-browser": "^6.0.0",
"@angular/platform-browser-dynamic": "^6.0.0",
"@angular/router": "^6.0.0",
No need to stress
The answer is very simple go into your package.json file and change the version number to your desired version number.
Viola and run npm install.
Done.