Search code examples
javascriptnode.jsangularnpmyarnpkg

How do I remove yarn from angular cli. I want to use npm to install packages


Installing packages for tooling via yarn.
An unhandled exception occurred: 'yarn' is not recognized as an internal or external command,
operable program or batch file.
Package install failed, see above.
See "C:\Users\hp\AppData\Local\Temp\ng-TAwQZJ\angular-errors.log" for further details.

This is the error in my terminal everytime I try to install any package.

I have tried "npm uninstall -g yarn" nothing happens. I tried in control panel to find any yarn package but nothing. How can we do this and install packages via npm?


Solution

  • try either of

    ng config --global cli.packageManager npm
    

    or

    ng set --global packageManager=npm
    

    Also, Yarn is faster and better as per some blogs,

    So you can keep yarn as default package manager and install it

    https://classic.yarnpkg.com/en/docs/install/