openks / learn-vue

自定义组件文档
https://openks.github.io/learn-vue
0 stars 0 forks source link

20171031_yarn使用淘宝源 #58

Open openks opened 7 years ago

openks commented 7 years ago
//注意-g必不可少 不然那不起作用
yarn config set registry https://registry.npm.taobao.org -g
//node-sass建议也配置下 不然会去gitHub下载
yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g
openks commented 7 years ago
npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver
openks commented 7 years ago
npm config set PHANTOMJS_CDNURL http://npm.taobao.org/mirrors/phantomjs -g 
npm config set CHROMEDRIVER_CDNURL http://npm.taobao.org/mirrors/chromedriver -g
openks commented 6 years ago

也可以直接从本地读取数据,相关配置信息如下

# .npmrc
# chrome-driver 
chromedriver_filepath=D:\Users\Public\static\chromedriver_win32.zip
# node-sass 可以从https://npm.taobao.org/mirrors/node-sass下载也可以从同事机器上复制
SASS_BINARY_PATH=D:\Users\Public\static\win32-x64-57_binding.node
openks commented 6 years ago

PhantomJS 安装失败解决方案: 从阿里镜像下载 1.下载的文件名:phantomjs-2.1.1-windows.zip,直接解压出来,解压后的文件复制到你电脑的任意盘(我是放在D盘),

  1. 把bin目录放到path里,关闭所有cmd 并重启