npm 安装 chromedriver 失败的解决办法

npm 安装 chromedriver 失败的解决办法

报错信息:

> chromedriver@2.27.2 install /Users/Mario/Work/Lab/waylens-all-in-one-site/node_modules/chromedriver
> node install.js

Downloading https://chromedriver.storage.googleapis.com/2.27/chromedriver_mac64.zip
Saving to /var/folders/7l/mhhqzhps0y59by7pf04nyx5r0000gn/T/chromedriver/chromedriver_mac64.zip
events.js:161
throw er; // Unhandled 'error' event
^

Error: connect ETIMEDOUT 74.125.23.128:443
at Object.exports._errnoException (util.js:1023:11)
at exports._exceptionWithHostPort (util.js:1046:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14

原因下载国外的镜像慢~~~

解决方法:

npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver
posted @ 2020-08-24 18:07  趙小傑  阅读(976)  评论(0编辑  收藏  举报