Yarn is an alternative for npm, the default package manager on @angular/cli. If you want to use yarn as package manager for @angular/cli follow this steps:
npm install --global yarn
or see the installation page)npm install -g @angular/cli
or yarn global add @angular/cli
)To set yarn as @angular/cli package manager:
ng set --global packageManager=yarn
To set back npm as @angular/cli package manager:
ng set --global packageManager=npm