-2

I used the npm start command. The error comes up as below. I think it could be Version Problem. My Node.js Version v10.16.3.. delete package. lock file and node_modeules folder from frontend and then run this commands.

i was run this commands one by one

npm uninstall -g angular-cli
    
npm uninstall -g @angular/cli
    
npm cache clean

npm install -g @angular/cli@11

Again the same error comes to her

@genesisui/angular@1.8.12 start D:> node --max_old_space_size=8000 ./node_modules/@angular/cli/bin/ng serve --o --host 0.0.0.0 --proxy-conf proxy.conf.json

Node.js version v10.16.3 detected.
The Angular CLI requires a minimum Node.js version of either v14.15, or v16.10.

Please update your Node.js version or visit https://nodejs.org/ for additional instructions.

npm ERR! code ELIFECYCLE
npm ERR! errno 3
npm ERR! @genesisui/angular@1.8.12 start: `node --max_old_space_size=8000 ./node_modules/@angular/cli/bin/ng serve --o --host 0.0.0.0 --proxy-conf proxy.conf.json`
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the @genesisui/angular@1.8.12 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Dell\AppData\Roaming\npm-cache\_logs\2022-06-27T04_09_42_465Z-debug.log 
  • You *think* it might be a version problem? The error message literally says *"The Angular CLI requires a minimum Node.js version of either v14.15, or v16.10."*. – Robby Cornelissen Jun 27 '22 at 05:25
  • But my project version is v10.16.3. – Code Killer Zhara Jun 27 '22 at 05:28
  • Similar Question has been answered on the following link https://stackoverflow.com/questions/60200991/unable-to-get-angular-cli-version-though-all-the-requirements-are-installed – Nadun Jun 27 '22 at 05:40

1 Answers1

0

You should remove your NodeJS installation completely and re-install NodeJS through NVM. This will help you to swap between multiple NodeJS versions and the other benefit of that for each active NodeJS version you may able to install specific Angular CLI version.

e.g:

nvm install 11  
nvm install 12
nvm alias default 12  
nvm use 11  
npm install @angular/cli -g

Also see some details on Angular CLI version here P.S If you where using brew, to uninstall NodeJS follow this steps:

brew uninstall node; 
# or `brew uninstall --force node` which removes all versions
brew cleanup;
rm -f /usr/local/bin/npm /usr/local/lib/dtrace/node.d;
rm -rf ~/.npm /usr/local/bin/node;
Jonathan Joshua
  • 222
  • 1
  • 10
  • Based on the question the node version should alt least be v14.15, or v16.10. So it should be `nvm install 14.15` or later. The rest is totally fine. – Der Alex Jun 27 '22 at 05:42