yoowinsu / blog

issues blog
17 stars 3 forks source link

ChromeDriver installation failed Error with http(s) request: Error: read ECONNRESET 问题 #64

Open yoowinsu opened 6 years ago

yoowinsu commented 6 years ago

发现 npm 安装 vue-vli 包的时候,执行npm install会报错,报错内容如下:

> chromedriver@2.33.2 install C:\Users\Administrator\Desktop\vue-demo\node_modules\chromedriver
> node install.js

Downloading https://chromedriver.storage.googleapis.com/2.33/chromedriver_win32.zip
Saving to C:\Users\ADMINI~1\AppData\Local\Temp\chromedriver\chromedriver_win32.zip
ChromeDriver installation failed Error with http(s) request: Error: read ECONNRESET
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! chromedriver@2.33.2 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the chromedriver@2.33.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2017-12-01T00_36_59_971Z-debug.log

大意是说 chromedriver 安装失败了,谷歌了之后,找到了 vue-issues 上的解决办法,执行了下面一行代码就可以了:

npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver

然后就问题解决了,顺利 npm i