imPK
imPK

Reputation: 884

Yarn global add <package> gives error "couldn't find package on npm registry"

I'm new to yarn and when trying to install bower or gulp or any other packages global using the following command

yarn global add <package>

I get following error

enter image description here

Upvotes: 20

Views: 20503

Answers (2)

Devaki Pallewar
Devaki Pallewar

Reputation: 31

If you tried everything like registry setup, clearing cache and other commands for npm and yarn and your issue is not solved then try a simple approach by deleting lock files from your folder and run "yarn install" again.

Upvotes: 3

imPK
imPK

Reputation: 884

This error was resloved by running

npm config set registry https://registry.npmjs.org/

npm registry was missing in config file

Upvotes: 43

Related Questions