乐趣区

关于yarn:yarn-安装包时出现错误

error An unexpected error occurred: "https://registry.npm.taobao.org/egg: tunnel ing socket could not be established, cause=getaddrinfo ENOTFOUND 9999

猜想起因: 本机有 proxy 工具
解决办法:

yarn config set proxy http://localhost:port
yarn config set https-proxy http://localhost:port

减速办法:

yarn config set registry https://registry.npm.taobao.org --global
// 查看配置
yarn config list
退出移动版