1

Angular is telling me that my Node.js version is too old for my Angular version:

sudo ng serve

You are running version v4.2.6 of Node.js, which is not supported by Angular CLI v6.
The official Node.js version that is supported is 8.9 and greater.

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

I updated my Node.js version to the latest:

node --version

v11.9.0

npm --version

6.7.0

nvm --version

0.34.0

Even after updating Node It still gives me the warning. This problem only happens when I use sudo before the command.

Edit 1

As requested:

ng --version

    _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 7.1.4
Node: 11.9.0
OS: linux x64
Angular: 7.1.4
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.11.4
@angular-devkit/build-angular     0.11.4
@angular-devkit/build-optimizer   0.11.4
@angular-devkit/build-webpack     0.11.4
@angular-devkit/core              7.1.4
@angular-devkit/schematics        7.1.4
@ngtools/webpack                  7.1.4
@schematics/angular               7.1.4
@schematics/update                0.11.4
rxjs                              6.3.3
typescript                        3.1.6
webpack                           4.23.1
  • can you post output of ng --version from your project directory? – Ujjwal kaushik Feb 01 '19 at 11:24
  • Added the output to the question. – Jean Willian S. J. Feb 01 '19 at 11:27
  • 1
    Why are you using sudo ? – Melchia Feb 01 '19 at 11:27
  • Because ***ng serve*** was not automatically updating and I read in another question that It could be that I needed to give It more permissions: https://stackoverflow.com/questions/48092880/ng-serve-not-detecting-file-changes-automatically – Jean Willian S. J. Feb 01 '19 at 11:33
  • 1
    for your watch issue, have you tried changing the amount of watches? answered here : https://stackoverflow.com/questions/48092880/ng-serve-not-detecting-file-changes-automatically#answer-49045489 seems legit reason :P – Ujjwal kaushik Feb 01 '19 at 11:42
  • @Ujjwalkaushik It started working again. When I close and then open VS Code It also works, but the detected changes only occur in HTML or Typescript files. – Jean Willian S. J. Feb 01 '19 at 11:55
  • that's interesting. It should work. for which file format its not working ? anyway you can checkout this thread too :) https://github.com/angular/angular-cli/issues/8168#issuecomment-355455249 – Ujjwal kaushik Feb 01 '19 at 12:18
  • and for your sudo ng serve problem, can you check if output of which node & sudo which node are same ? – Ujjwal kaushik Feb 01 '19 at 12:19

0 Answers0