情况如图:
yarn后安装packge,却一直在waiting,真的等了很久很久…肯定有问题!
解决办法:
在项目的根目录新建.yarnrc文件。文件里面加上这样的内容:
registry "https://registry.npm.taobao.org"
sass_binary_site "https://npm.taobao.org/mirrors/node-sass/"
phantomjs_cdnurl "http://cnpmjs.org/downloads"
electron_mirror "https://npm.taobao.org/mirrors/electron/"
sqlite3_binary_host_mirror "https://foxgis.oss-cn-shanghai.aliyuncs.com/"
profiler_binary_host_mirror "https://npm.taobao.org/mirrors/node-inspector/"
chromedriver_cdnurl "https://cdn.npm.taobao.org/dist/chromedriver"
在终端ctrl+C结束上次的进程再重新yarn,这次很快就能成功了。