执行yarn命令报错解决方案“error An unexpected error occurred: "https://registry.npm.taobao.org/”
-
因为yarn的源是
https://registry.npm.taobao.org
-
而npm的源是
https://registry.npm.org
-
查看npm的源
npm config get registry
-
修改npm源
方法一:npm config set registry https://registry.npm.taobao.org npm config set disturl https://npm.taobao.org/dist
方法二:
yarn config set registry https://registry.npm.taobao.org/ yarn config set disturl https://npm.taobao.org/dist yarn config set sass-binary-site https://npm.taobao.org/mirrors/node-sass
-
添加 yarn源
yarn add taobao https://registry.npm.taobao.org/
-
代理问题:
yarn config rm proxy yarn config rm https-proxy