ChromeDriver installation failed解决

Posted 程序猿LM

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ChromeDriver installation failed解决相关的知识,希望对你有一定的参考价值。

在执行 npm install命令,偶尔会报出chromedriver无法下载的错误,通过查询,发现在Github下vue-router的issue上有对这个问题的解决办法,具体链接issue,这篇文章总结了一下解决办法。

首先上错误信息:

 
   
   
 
  1. Downloading https://chromedriver.storage.googleapis.com/2.33/chromedriver_mac64.zip

  2. Saving to /usr/local/tomcat/project/hello-vue/node_modules/chromedriver/chromedriver/chromedriver_mac64.zip

  3. ChromeDriver installation failed Error with http(s) request: Error: read ETIMEDOUT

  4. npm  WARN karma-sinon-chai@1.3.2 requires a peer of sinon@^2.1.0 but none was installed.

  5. npm  ERR! Darwin 15.6.0

  6. npm  ERR!  argv "/usr/local/Cellar/node/5.8.0/bin/node" "/usr/local/bin/npm" "install"

  7. npm  ERR!  node v7.8.0

  8. npm  ERR!  npm  v4.2.0

  9. npm  ERR!  code ELIFECYCLE

  10. npm  ERR!  errno 1

  11. npm  ERR! chromedriver@2.33.2 install: `node install.js`

  12. npm  ERR! Exit status 1

  13. npm  ERR!

  14. npm  ERR! Failed at the chromedriver@2.33.2 install script 'node install.js'.

  15. npm  ERR! Make sure you have the latest version of node.js and npm installed.

  16. npm  ERR! If you do, this is most likely a problem with the chromedriver package,

  17. npm  ERR! not with npm itself.

  18. npm  ERR! Tell the author that this fails on your system:

  19. npm  ERR!  node install.js

  20. npm  ERR! You can get information on how to open an issue for this project with:

  21. npm  ERR!  npm bugs chromedriver

  22. npm  ERR! Or if that isn't available, you can get their info via:

  23. npm  ERR!  npm owner ls chromedriver

  24. npm  ERR! There is likely additional logging output above.

  25. npm  ERR! Please include the following file with any support request:

  26. npm  ERR!  /var/root/.npm/_logs/2017-10-27T01_56_37_026Z-debug.log

解决办法:

执行以下命令即可。

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





(完)


以上是关于ChromeDriver installation failed解决的主要内容,如果未能解决你的问题,请参考以下文章

ChromeDriver installation failed解决

npm install chromedriver 无法正常工作

npm install 报错 chromedriver 安装失败

npm install 错误 安装 chromedriver 失败的解决办法

vue项目之npm install 的chromedriver

解决npm install时报错无法安装chromedriver的问题