-2

enter image description here

The version am using is 6.0.8.While trying adding angular/pwa in my project am getting this error. In my cmd prmt it shows my angular cli version as 6.0.8, but inmy bash cmd it shows version 1.7. can someone help me on this. enter image description here @angular/cli: 1.7.4

VinoPravin
  • 947
  • 3
  • 17
  • 32

3 Answers3

1

In order to use ng add you must have cli version >=6 but you are using Angular CLI version of 1.7.4, That is why this command is not supported in your installed CLI.

For more information about changelog and Commands see here in changlog -

Pardeep Jain
  • 84,110
  • 37
  • 165
  • 215
0

ng add has been introduced in Angular 6. Update your CLI

Maciej Treder
  • 11,866
  • 5
  • 51
  • 74
0

Actually it was my mistake, I've updated the global cli, but my project's local cli was not get updated, andso I got such error. I've update my projects angular cli dependency with 'npm update @angular/cli' which updated the old cli with the latest one, and is solved my problem :)

VinoPravin
  • 947
  • 3
  • 17
  • 32