在使用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