编译插件vue-devtools,npm run build后报
报错信息如下:
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.
错误原因:因为最新版本vue-devtools使用最新版本webpack4,所以node版本至少大于6.11.5
解决办法:卸掉以前装的node,到官网下载安装一个最新版本的node