My npm version is 5.5.1 and angular cli version is 6.2.1. When I try to create a new project using the command ng new Project_name<
The Easy Way:
example:npm install -g @angular/cli@6
here the -g flag tells npm to do this install globally. The 6 on the end tells npm that I want the latest available version 6.
if I want to create a new application for Angular 5 I do this :
> npm install -g @angular/cli@1
> ng new my-ng5-app
Remember, Angular CLI was version 1.7 for Angular 5.
if I want to create a new application for Angular 6 I do this :
> npm install -g @angular/cli@6
> ng new my-ng6-app
if I want to create a new application for Angular 7 I do this :
> npm install -g @angular/cli@7
> ng new my-ng7-app
I hope it would be helpful for you thanks....!
read full blog click here