4

I am trying to install angular cli but i am getting below the message. How can i install specific angular cli version for nodejs v6.x.x.which angular cli verion is suitable for nodsjs v6.x.x?

You are running version v6.x.x of node.js, which is not supported by angular CLI v6. The official Node.js version that is supported is 8.x and greater.
Apple Orange
  • 646
  • 5
  • 12
  • 27

3 Answers3

18

I think the last version compatible with node 6.9.x is @angular/[email protected] Check this for all versions

npm uninstall -g @angular/cli
npm cache clean --force
npm install -g @angular/[email protected]
Tim Martens
  • 1,464
  • 9
  • 18
1

You have to adjust the version of angular-cli in your package.json file. There should be an entry for the angular-cli. Take a look at the following image. Under devDependenciesyou can see @angular/cli with the version. Change this version and invoke again npm install.

enter image description here

The package.json is located in the root directory of you angular project. It is automatically generated when you did npm init.

kedenk
  • 659
  • 6
  • 9
  • kedenk:So i want to change only "@angular/cli":"~1.7.0" rite? then nmp install? – Apple Orange Aug 01 '18 at 08:26
  • Yes, but maybe you have to take a look at other dependencies because of compatibility. If you change the version of `@angular/cli`, maybe you have to change also the version for `@angular/compiler-cli`, for example. – kedenk Aug 01 '18 at 08:28
-2

If you want to install the latest version of Node on your system either you can upgrate or you can uninstall the current node version then download and install below official node site - https://nodejs.org/en/download/

To check current installed node version use

1. Window key+ r -> opens run window
2. Type cmd press enter.
3. Type node -v to check the currently installed node version.
4. Type npm -v to check currently installed npm version.
5. Your primary problem was to install angular/cli
so  use command npm install -g @angular/cli this will install angular/cli globally.
Prabhat Maurya
  • 1,058
  • 16
  • 21