0

I have node version 8.9.3 and my angular cli version is above 8. Since Angular CLI 8 and above are not supported. I tried to downgrade the angular version less than 8. (say 7.3.5). I could not update node and I am in need of node in the specified version. In order to downgrade angular cli, I first did uninstall the current angular cli and then installed the cli version which I want. After installing the cli, ng --version throws the following error:

You are running version v8.9.3 of Node.js, which is not supported by Angular CLI 8.0+.

The official Node.js version that is supported is 10.9 or greater.

Please visit https://nodejs.org/en/ to find instructions on how to update Node.js.

Later I visited the below links and none of the solution worked for me.

Solution I tried:

  1. Uninstall globally using npm uninstall -g @angular/cli command
  2. Npm Cache cleaned and verified npm cache clean --force npm cache verify
  3. Manually deleted the cli folder in Appdata/Roaming/npm .

enter image description here

Community
  • 1
  • 1
Jeyanth
  • 443
  • 1
  • 6
  • 17
  • Do you a Angular Project in your user folder? Please try the command again without the `-g` flag. – ruth May 02 '20 at 09:48

1 Answers1

0

Since you need to use the specific version of angular cli that goes with your node version, you can do that by

This command would install the 1.0.0 version:

npm install -g @angular/cli@1.0.0
Sajeetharan
  • 203,447
  • 57
  • 330
  • 376
  • But the problem is current angular version is not uninstalled properly. After uninstalling if I check the version, it shows the same error as I mentioned rather than`ng is not recognized as internal or external command`. – Jeyanth May 02 '20 at 07:19
  • it means angular cli is not there. just install as above again and try – Sajeetharan May 02 '20 at 07:22
  • when `ng is not recognized as internal or external command` this message prompts, we can say angular cli is not there. But the message even not showing. Instead it shows, `You are running version v8.9.3 of Node.js, which is not supported by Angular CLI 8.0+.` which means still Angular cli 8 or above is there and is not removed. This was what I tried to say in the previous comment – Jeyanth May 02 '20 at 07:26
  • can you try what i mentioned above with lower verison – Sajeetharan May 02 '20 at 07:31