I was working on personal project which was in Angular 5. Due to some reason I have changed my device, how could I install Angular 5 in my new device since there is new version is available, Is there any way to install Angular 5 instead Angular 6?
Asked
Active
Viewed 7,010 times
3 Answers
7
Like this
npm uninstall -g @angular/cli
npm install -g @angular/cli@5.0.0
but even install the lates angular cli will not effect your old project , just you will get a warning when you try to serve the project.
Happy coding

Muhammed Albarmavi
- 23,240
- 8
- 66
- 91
-
1For Angular 5: `npm install -g @angular/cli@1` – Yosvel Quintero Apr 19 '19 at 10:29
-
@YosvelQuintero when I used cli@1 , I got installed 1.7.4 version of angular cli ? – Nadee Jun 27 '19 at 05:28
-
@Nadee this `npm i @angular/cli@1` will install the lates version of cli 1.x.x if you want version 5.x.x try this way `npm i @angular/cli@5` – Muhammed Albarmavi Jun 27 '19 at 05:32
-
1@YosvelQuintero For latest verion of Angular cli 5: `npm install -g @angular/cli@5` – Muhammed Albarmavi Jun 27 '19 at 05:33
1
npm install @angular/<module>@5
will install the most recent version that satisfies the requirements, just replace the with the angular submodule.
Alternatively, go to your package.json file and specify e.g. "5.x.x" as the version for your angular dependencies. Run npm install
afterwards

Jan
- 11
- 2
1
Anyone that comes across this, there's no @angular/cli@5
at the time of this answer. Use version 1.x.x instead.
npm i @angular/cli@1
or yarn add @angular.cli@1

Yaobin Then
- 2,662
- 1
- 34
- 54