Reputation: 528
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
Upvotes: 6
Views: 25020
Reputation: 121
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.
Upvotes: 1
Reputation: 601
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
Upvotes: 1
Reputation: 745
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]
Upvotes: 2
Reputation: 2253
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
Upvotes: 8