macOs 克隆vue项目后 使用yarn下载依赖时出现问题报错: Error when trying to download chromedriver binary

问题:

在从GitHub拉下vue核心库项目后,在终端执行yarn命令后,出现:

[email protected] install: `node install.js`
ERR! Exit status 1
ChromeDriver binary exists. Validating...
Current existing ChromeDriver binary is unavailable, proceding with download and extraction.
Downloading from file:  https://chromedriver.storage.googleapis.com/LATEST/chromedriver_mac32.zip
Saving to file: /var/folders/kr/pchwnbg56sq_qwp0s6qvtzb40000gp/T/73.0.3683.20/chromedriver/chromedriver_mac32.zip
Received 0K total.
Extracting zip contents
ChromeDriver installation failed Error extracting archive: Error: end of central directory record signature not found

经过

试过网上npm i -S chromedriver 的方法和按照提示直接从官网下载chromedriver_win32.zip到目录/var/folders/kr/pchwnbg56sq_qwp0s6qvtzb40000gp/T/73.0.3683.20/chromedriver/下,都不行
最后找到一篇帖子,发现真正有问题的是node找不到相关所以,所以命令运行不了 chromedriver

解决方法

先执行

cnpm install chromedriver -g

或者

yarn add global chromedriver 

全局安装,然后再继续yarn安装依赖就好了

你可能感兴趣的:(macOs 克隆vue项目后 使用yarn下载依赖时出现问题报错: Error when trying to download chromedriver binary)