報(bào)錯(cuò)信息如下:
npm ERR! Windows_NT 10.0.17134
npm ERR! argv "D:\software\node.js\node.exe" "D:\software\node.js\node_modules\npm\bin\npm-cli.js" "run" "build"
npm ERR! node v6.10.2
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! vue-devtools@4.1.5 build: cd shells/chrome && cross-env NODE_ENV=production webpack --progress --hide-modules
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the vue-devtools@4.1.5 build script 'cd shells/chrome && cross-env NODE_ENV=production webpack --progress --hide-modules'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the vue-devtools package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cd shells/chrome && cross-env NODE_ENV=production webpack --progress --hide-modules
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs vue-devtools
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls vue-devtools
npm ERR! There is likely additional logging output above.
錯(cuò)誤原因:因?yàn)樽钚掳姹緑ue-devtools使用最新版本webpack4跷跪,所以node版本至少大于6.11.5
解決辦法:卸掉以前裝的node掌腰,到官網(wǎng)下載安裝一個(gè)最新版本的node