I am trying to get yarn installed on my mac, yarn installs but running yarn commands hangs with the following error.
>yarn
TypeError: Cannot read property 'yarnPath' of null
at loadRcFile (/usr/local/lib/node_modules/yarn/lib/cli.js:56945:49)
at /usr/local/lib/node_modules/yarn/lib/cli.js:56916:14
at /usr/local/lib/node_modules/yarn/lib/cli.js:101331:14
at Array.map (<anonymous>)
at parseRcPaths (/usr/local/lib/node_modules/yarn/lib/cli.js:101329:78)
at Object.findRc (/usr/local/lib/node_modules/yarn/lib/cli.js:101343:10)
at getRcConfigForCwd (/usr/local/lib/node_modules/yarn/lib/cli.js:56915:74)
at /usr/local/lib/node_modules/yarn/lib/cli.js:92694:56
at Generator.next (<anonymous>)
at step (/usr/local/lib/node_modules/yarn/lib/cli.js:310:30)
I have tried uninstalling yarn and reinstalling with
npm uninstall -g yarn && npm install -g yarn
and that didn't fix this issue. thanks in advance for the help... cheers!
I got this error whenever I tried to run the
yarn
command and solved it by removing a line from a .yarnrc.yml file that was located in the folder in which I was running yarn.Once I did that yarn worked again.