So I was trying to upgrade our entire web-application earlier from Angular 6 to 7. And I was able to do that since the script I run earlier installed the most latest version available of Angular which is Angular 8 (should have been 7 though as I thought) release 2 days ago. But it turns out there are build issues in the node modules when I did the upgrade to Angular 8. So instead, I want to downgrade my project from Angular 8 to Angular 7. How do I do that?. TIA.
PS: I did not expect that there is Angular 8 alright, so I thought it would install Angular 7 as the latest version.
You can optionally pass the --create-commits (or -C ) flag to ng update commands to create a git commit per individual migration. Run NG_DISABLE_VERSION_CHECK=1 npx @angular/cli@9 update @angular/core@9 @angular/cli@9 which should bring you to version 9 of Angular.
Run npx @angular/cli@10 update @angular/core@10 @angular/cli@10 which should bring you to version 10 of Angular. New projects use the filename . browserslistrc instead of browserslist . ng update will migrate you automatically.
Try like this :
ng --version
npm uninstall -g @angular/cli
npm cache clean --force
npm install -g @angular/[email protected]
ng --version
Update
The version 7.2.12 is given the following error :
npm ERR! code ETARGET npm ERR! notarget No matching version found for @angular/[email protected] npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist.
use this instead :
npm install -g @angular/[email protected]
you can specify the version while install,
npm install -g @angular/[email protected]
if you dont specify it will install latest version , incase specified will install given version.
here is the doc, list of angular version and its command..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With