当前位置:   article > 正文

执行npm i下载chromedriver失败解决方案_current existing chromedriver binary is unavailabl

current existing chromedriver binary is unavailable, proceding with download

执行npm i 安装vue项目依赖时,下载chromedriver读取超时,错误如下:

> chromedriver@2.46.0 install /node_modules/chromedriver

> node install.js

Current existing ChromeDriver binary is unavailable, proceding with download and extraction.
Downloading from file:  https://chromedriver.storage.googleapis.com/2.46/chromedriver_mac64.zip
Saving to file: /var/folders/9n/lq9x___n4ngdlzjfz95zkxzw0000gn/T/2.46/chromedriver/chromedriver_mac64.zip
ChromeDriver installation failed Error with http(s) request: Error: read ECONNRESET
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! chromedriver@2.46.0 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the chromedriver@2.46.0 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!     ~/.npm/_logs/2020-07-09T07_25_07_183Z-debug.log   
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20

解决方案:指定淘宝chromedriver下载地址

 npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver
  • 1
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/593084
推荐阅读
相关标签
  

闽ICP备14008679号