当前位置:   article > 正文

npm install:ChromeDriver installation failed Error with http(s) request: Error: read ETIMEDOUT_requesterror: read enotconn

requesterror: read enotconn

项目使用vue开发,通过npm install安装全局依赖的时候,出错了,卡在了chromedriver的地方,日志内容

  1. huyikangdeMacBook-Pro:vbap-widgets kangkang$ npm install
  2. > chromedriver@2.33.2 install /Users/kangkang/vbap-widgets/node_modules/chromedriver
  3. > node install.js
  4. Downloading https://chromedriver.storage.googleapis.com/2.33/chromedriver_mac64.zip
  5. Saving to /var/folders/6_/vt2sqf214dn36kyl97183j6c0000gn/T/chromedriver/chromedriver_mac64.zip
  6. ChromeDriver installation failed Error with http(s) request: Error: read ETIMEDOUT
  7. npm WARN vbap-widgets@3.0.6-SNAPSHOT No license field.
  8. npm ERR! code ELIFECYCLE
  9. npm ERR! errno 1
  10. npm ERR! chromedriver@2.33.2 install: `node install.js`
  11. npm ERR! Exit status 1
  12. npm ERR!
  13. npm ERR! Failed at the chromedriver@2.33.2 install script.
  14. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  15. npm ERR! A complete log of this run can be found in:
  16. npm ERR! /Users/kangkang/.npm/_logs/2017-11-28T01_10_25_967Z-debug.log

显示在chromedriver@2.33.2 install script的时候失败了,把连接复制到浏览器,就是访问不了啦,只能找一个国内的镜像源安装,首先想到的就是淘宝的镜像源。解决办法:

npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver
运行安装成功
  1. huyikangdeMacBook-Pro:vbap-widgets kangkang$ npm install chromedriver --chromedriver_cdnurl=http://npm.taobao.org/mirrors/chromedriver
  2. > chromedriver@2.33.2 install /Users/kangkang/vbap-widgets/node_modules/chromedriver
  3. > node install.js
  4. Downloading http://npm.taobao.org/mirrors/chromedriver/2.33/chromedriver_mac64.zip
  5. Saving to /var/folders/6_/vt2sqf214dn36kyl97183j6c0000gn/T/chromedriver/chromedriver_mac64.zip
  6. Received 783K...
  7. Received 1564K...
  8. Received 2348K...
  9. Received 3131K...
  10. Received 3914K...
  11. Received 4695K...
  12. Received 5299K total.
  13. Extracting zip contents
  14. Copying to target path /Users/kangkang/vbap-widgets/node_modules/chromedriver/lib/chromedriver
  15. Fixing file permissions
  16. Done. ChromeDriver binary available at /Users/kangkang/vbap-widgets/node_modules/chromedriver/lib/chromedriver/chromedriver
  17. npm WARN vbap-widgets@3.0.6-SNAPSHOT No license field.
  18. + chromedriver@2.33.2
  19. added 2 packages in 13.709s



声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/593195
推荐阅读
相关标签
  

闽ICP备14008679号