Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

  • I have yarn path setup in my .bash_profile as
  • yarn version 1.0.1
  • node version v8.4.0
like image 343
imPK Avatar asked Sep 08 '17 18:09

imPK


2 Answers

This error was resloved by running

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

npm registry was missing in config file

like image 146
imPK Avatar answered Sep 21 '22 10:09

imPK


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.

like image 31
Devaki Pallewar Avatar answered Sep 18 '22 10:09

Devaki Pallewar