简体   繁体   English

Angular CLI 在 ng 更新期间未检测到 NPM 版本(v10 --> v11)

[英]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.

相关问题 Node V10 与 Node V11 中 util.format 的行为 - Behaviour of util.format in Node V10 vs Node V11 docker 构建出现错误,检测到节点 v10,Angular CLI 需要 v12.14 或 v14.15 的最低 Node.js 版本 - docker build gives error, node v10 detected, The Angular CLI requires a minimum Node.js version of either v12.14 or v14.15 节点 v11 使用扩展运算符抛出 - Node v11 throws with spread operator 如何解决这个错误? angular v11 原理图工作流程失败。 看上面 - How to solve this error ? angular v11 The Schematic workflow failed. See above npm更新成功触发,但实际上并未升级npm -v - npm update fires off successfully, but doesn't actually upgrade npm -v 为什么不能在Node.js v10中“将*从'readline'导入为readline”? - Why can't I “import * as readline from 'readline'” in Nodejs v10? 为什么我的节点版本在我的 ubuntu 终端 v10 中,即使我通过浏览器下载了最新的稳定版本? - Why is my node version in my ubuntu terminal v10 even though I downloaded the latest stable version through browser? NPM:使用 nvm 在 Windows 10 上运行 npm -v 时找不到 npm-cli.js - NPM: npm-cli.js not found when running npm -v on Windows 10 with nvm ng serve在Windows10上不起作用(angular-cli,节点6.3.0) - ng serve doesn't work on Windows10 (angular-cli, node 6.3.0) ng 构建失败并显示“您正在运行 Node.js 的 v8.11.3 版本,Angular CLI 8.0+ 不支持该版本。” - ng build fails with “You are running version v8.11.3 of Node.js, which is not supported by Angular CLI 8.0+.”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM