> 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 --ignore-scripts,再npm install
因为安装过程中会执行install.js,install.js会下载chromedriver。我们加参数ignore-scripts忽略install.js执行。尤其是在服务器上,下载安装chromedriver会比较麻烦,推荐这种方案 - 开网络代理下载chromedriver没啥好说的