我正在尝试在我的 Mac 上安装纱线,纱线安装但运行纱线命令挂起并出现以下错误。
>纱线
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)
我试过卸载纱线并重新安装
npm uninstall -g yarn && npm install -g yarn
这并没有解决这个问题。提前感谢您的帮助...干杯!