npm ERR! errno 1 npm ERR! chromedriver@2.35.0 install: `node install.js`
在使用webpack+vue-cli进行vue项目构建时可能会出现一下错误,webpack@3.10.0及以上版本和vue-cli@2.9.2及以上版本会自动安装依赖(我在自己电脑上测试是这样的)不用我们进入项目文件夹下npm install 进行安装。
可能会出现错误:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! chromedriver@2.35.0 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the chromedriver@2.35.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! C:\Users\SUN&LI\AppData\Roaming\npm-cache\_logs\2018-01-23T08_03_03_356Z-debug.log
解决方法:
npm install chromedriver@2.35.0 --ignore-scripts
或者:
npm install chromedriver --chromedriver_cdnurl=https://npm.taobao.org/mirrors/chromedriver
详细用法可以查看官方地址:https://www.npmjs.com/package/chromedriver