6
votes

My current angular version is '^7.1.4' and I want to continue with same version. but while doing ng serve I am getting below 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.

Node version : v8.9.3 NPM Version : 6.4.1

thanks in advance

4
Did you upgrade angular/cli? What's the version number in package.json? Did you recently initiate an Angular 8 project? - ulmas

4 Answers

8
votes

Looks like your global CLI version got upgraded to 8. To downgrade to 7 try this:

 ng --version
 npm uninstall -g @angular/cli
 npm cache clean --force

 npm install -g @angular/[email protected]
 ng --version
2
votes

It seems that you might have upgraded your angular/cli to latest, downgrade it to version 7.1.4. Run these commands -

npm uninstall -g @angular/cli
npm cache clean --force    
npm install -g @angular/[email protected] 
0
votes

You can use nvm for a different angular project you can switch your node version as your requirement, here I attach a link to install nvm. https://itnext.io/nvm-the-easiest-way-to-switch-node-js-environments-on-your-machine-in-a-flash-17babb7d5f1b

0
votes

To resolve this issue you have to use that version of NodeJS which is compatible or supported by the Angular CLI.

You can take reference through this link Angular CLI, Angular, and Node.js compatibility matrix. to understand the version compatibility and downgrade or upgrade the NodeJs version accordingly.

To upgrade or downgrade the NodeJS Version you can use NVM.

Always try to use the LTS version of NodeJS while working with the Angular CLI because there might be a case in which the Angular CLI version does not support the version of NodeJs That's why it is recommended to use the LTS version of NodeJS.