kunpengweb
故障排除
更新时间:2020/03/19 GMT+08:00
问题描述:
在安装指导中创建Vue项目时,下载chromedriver时出现异常,如下所示:
# Installing project dependencies ... # ======================== npm WARN deprecated extract-text-webpack-plugin@3.0.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-ext ract-plugin npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. npm WARN deprecated bfj-node4@5.3.1: Switch to the `bfj` package for fixes and new features! npm WARN deprecated flatten@1.0.2: I wrote this module a very long time ago; you should use something else. npm WARN deprecated json3@3.3.2: Please use the native JSON object instead of JSON 3 npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor. npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket da ta flow and an import issue introduced in 2.1.0 npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart() > chromedriver@2.46.0 install /usr/local/src/testProject/node_modules/chromedriver > node install.js /usr/local/src/testProject/node_modules/chromedriver/2.46/chromedriver is not writable: EACCES: permission denied, mkdir '/us r/local/src/testProject/node_modules/chromedriver/2.46' /usr/local/src/testProject/node_modules/chromedriver/2.46/chromedriver is not writable: EACCES: permission denied, mkdir '/us r/local/src/testProject/node_modules/chromedriver/2.46' Current existing ChromeDriver binary is unavailable, proceding with download and extraction. Downloading from file: https://chromedriver.storage.googleapis.com/2.46/chromedriver_linux64.zip Saving to file: /tmp/2.46/chromedriver/chromedriver_linux64.zip
问题原因:无法正常下载chromedriver。
解决方法:
- 手动设置npm中下载chromedriver的地址。
cd /usr/local/src
npm config set chromedriver_cdnurl https://npm.taobao.org/mirrors/chromedriver
- 设置完成后,先删除之前未创建成功的Vue项目,之后再创建Vue项目即可。
rm -rf testProject
父主题: 安装Element UI
