How to install a previous version in Angular

Asked

Viewed 5,848 times

2

Good evening, my question is very simple, but I did not find the answer, as I install a version 4 of Angular, if the current one is in the 6?

I tried to npm install -g @angular/cli@4 or npm install -g @angular/[email protected]

Don’t take it, make a mistake!

Thank you!

  • If the solution below is not certain, could you report what error is happening? Another thing you can try is, go to the project folder and delete the node_modules folder. then run the commands as answered below.

  • It is for creating a new project or an existing one?

  • It’s a new project!

1 answer

2

I believe it is enough to uninstall Angular globally and install version 4.

npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/[email protected]
  • I tried this option, but as I understood it, it installs version 1 and if I try: npm install -g @angular/cli@4 will not..

  • It is that to use Angular 4, you need the CLI 1.4. So it seems confusing.

  • Until the npm install -g @angular/[email protected] must rotate with Angular 4.

  • I found some information that can help you better understand these setups https://stackoverflow.com/questions/48230917/how-to-install-angular-cli-with-angular-v4-x.

  • Ahh, perfect, got it! Thank you so much for your help!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.