I have upgraded my Angular CLI globally but my project is using an older version of angular CLI, so I want to downgrade my Angular CLI globally.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can downgrade your global angular-cli
installation to eg. 1.0.0-beta.14
by issuing:
npm uninstall -g angular-cli
npm cache clean
npm install -g angular-cli@1.0.0-beta.14
The complete upgrade/downgrade guide is on GitHub README.
回答2:
Just for folks seeing this in the future, nowadays angular cli is named @angular/cli on npm, so the new commands to downgrade are these:
npm uninstall -g @angular/cli
npm install -g @angular/cli@1.6.8 // or whatever version you need
回答3:
npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli@1.0.0-beta.14