错误如下:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vuexms@1.0.0 dev: webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vuexms@1.0.0 dev 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! /Users/admin/.npm/_logs/2019-07-15T02_45_47_100Z-debug.log
localhost:vuexms admin$ npm uninstall webpack-dev-server
npm WARN ajv-keywords@3.4.1 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
原因:
这是新版webpack存在的BUG,卸载现有的新版本webpack,装老版本就好。
(1)npm uninstall webpack-dev-server
(2)npm install webpack-dev-server@2.9.1
(3)npm run dev