DEV Community

Aleksandr Ippatev
Aleksandr Ippatev

Posted on

6 3

How can I set yarn as the default packageManager for Angular CLI?

You hav to update package manager from npm to yarn.

ng config --global cli.packageManager yarn
Enter fullscreen mode Exit fullscreen mode

if you need back yarn to npm then

ng config --global cli.packageManager npm
Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
showcasefloyd profile image
Philip Isaacs

Does this mean you still need to install @angular/cli globally using npm first? Otherwise how can I run the ng command

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay