[英]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).我正在尝试更新我的 angular 应用程序(v10)以匹配我在开发机器(v11)上安装的@angular/cli 的全局版本。 (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).但是 ng 更新失败,说明我需要 NPM 版本 6(我已查看错误消息中链接的信息)。 Trouble is I am on npm version 6.14.8 already.
问题是我已经在 npm 版本 6.14.8 上。 Also, the error message looks like it should show the detected npm version, but is suspiciously empty.
此外,错误消息看起来应该显示检测到的 npm 版本,但可疑为空。
Running Ubuntu 20.04.2 LTS运行 Ubuntu 20.04.2 LTS
ng update @angular/core @angular/cli (error message) ng update @angular/core @angular/cli (错误信息)
npm --version npm --version
6.14.8 6.14.8
ng --version (project folder) ng --version(项目文件夹)
I did not find any similar questions in my searching.我在搜索中没有发现任何类似的问题。 Any help would be very much appreciated.
任何帮助将不胜感激。
Have you installed nodejs with snap?你用 snap 安装了 nodejs 吗? I have installed it with snap and then deleted it and installed it with the official repository.
我已经使用 snap 安装了它,然后将其删除并使用官方存储库安装了它。 After that, all things are perfectly working
在那之后,一切都完美无缺
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.