简体   繁体   中英

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) 在此处输入图像描述

npm --version

6.14.8

ng --version (project folder) 在此处输入图像描述

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM