Angular CLI with yarn

被刻印的时光 ゝ 提交于 2020-06-09 12:13:08

问题


How to change package manager for Angular Cli v6.0.3 to yarn? I tried:

ng set --global packageManager=yarn

But Angular says:

get/set have been deprecated in favor of the config command.


回答1:


ng config -g cli.packageManager yarn



回答2:


You can set global configuration using

ng config -g cli.packageManager yarn

If you want to set the package manager for a particular project then go to the root directory of the project and use the following command

ng config cli.packageManager yarn



回答3:


you hav to update package manager from npm to yarn.

ng set --global packageManager=yarn

if you need back yarn to npm then

ng set --global packageManager=npm




回答4:


To ng update using yarn you can also run:

ng update --packageManager=yarn

ng update --all --packageManager=yarn



来源:https://stackoverflow.com/questions/50999229/angular-cli-with-yarn

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!