问题描述
节点包angular-cli的当前版本有一些错误,所以我想恢复到以前的版本:1.0.0-beta.28.3.
The current version of the node package angular-cli has a few bugs, so I want to revert to a previous verison: 1.0.0-beta.28.3.
问题是我需要执行哪些步骤才能恢复到以前版本的节点包.
The question is what steps do I need to do to revert to a previous version of a node package.
我跑:
npm uninstall angular-cli --save -g
npm cache clean angular-cli
npm i --save -g [email protected]
这样做后,我重新安装并尝试打开一个新的 git 控制台.但是, ng --version 仍然返回:version 1.0.0-beta.28.3
After doing this, I reinstall and have tried opening a new git console. However, ng --version still returns: version 1.0.0-beta.28.3
推荐答案
如果您使用的是 Angular CLI beta.28 或更低版本,则需要卸载 angular-cli 包.由于将包的名称和范围从 angular-cli 更改为 @angular/cli,因此应该这样做:
If you're using Angular CLI beta.28 or less, you need to uninstall angular-cli package. It should be done due to changing of package's name and scope from angular-cli to @angular/cli:
npm uninstall -g angular-cli
npm uninstall --save-dev angular-cli
然后清理cacge并安装新版本
then clean the cacge and install the new version
npm cache clean
npm i --save -g [email protected]
这篇关于npm 无法恢复到以前版本的节点包 (angular-cli)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!