当未安装yarn 的时候 

 

 安装yarn 报错

npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! network request to http://registry.npmjs.org/yarn failed, reason: socket hang up
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Local\npm-cache\_logs\2022-12-06T10_57_58_317Z-debug-0.log

解决

npm config set registry https://registry.npm.taobao.org
npm config get registry

然后重新下载  即可

npm i yarn -g

yarn -v


版权声明:本文为qq_46703452原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/qq_46703452/article/details/128234663