Search code examples
node.jsnpmyarnpkg

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

Solution

  • This error was resloved by running

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

    npm registry was missing in config file