首页 > 解决方案 > 无法从 Angular 6 降级到 Angular 5

问题描述

我使用 angular 6 创建了我的项目,但由于某些原因我想回滚到 angular 5,我尝试了以下命令,但它显示了一些错误。

节点版本 - 10.4.1

npm 版本-6.1.0

npm ERR! code ETARGET
npm ERR! notarget No matching version found for @angular/cli@1.7.
npm ERR! notarget In most cases you or one of your dependencies are 
requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\TEKIZMA USER\AppData\Roaming\npm-cache\_logs\2018-06- 
27T0
_21_53_446Z-debug.log

标签: angular5angular6

解决方案


请尝试遵循此堆栈答案

据我所知,首先尝试将 NPM 降级,然后再降级。您可能也需要阅读内容。

尝试这种方式

npm install -g @angular/cli@YOUR_DESIRED_VERSION

推荐阅读