NotARealProgrammer
NotARealProgrammer

Reputation: 56

Angular CLI doesn't detect NPM version during ng update (v10 --> v11)

I am trying to update my angular app (v10) to match the global version of the @angular/cli I have installed on dev machine (v11). (seems like a better idea than just suppressing the warnings)

However ng update fails, stating I need NPM version 6 (I have reviewed info at the link in error message). Trouble is I am on npm version 6.14.8 already. Also, the error message looks like it should show the detected npm version, but is suspiciously empty.

Running Ubuntu 20.04.2 LTS

ng update @angular/core @angular/cli (error message) enter image description here

npm --version

6.14.8

ng --version (project folder) enter image description here

I did not find any similar questions in my searching. Any help would be very much appreciated.

Upvotes: 0

Views: 220

Answers (1)

Hojat Afsharan
Hojat Afsharan

Reputation: 60

Have you installed nodejs with snap? I have installed it with snap and then deleted it and installed it with the official repository. After that, all things are perfectly working

Upvotes: 1

Related Questions