对webpack进行npm run dev时报错:
> vue-router-demo@1.0.0 dev E:\vue-router-demo
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
'webpack-dev-server' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-router-demo@1.0.0 dev: `webpack-dev-server --inline --progress --co
nfig build/webpack.dev.conf.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-router-demo@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to in
stall?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2019-01-25T0
解决方法:cnpm install
注:使用npm install根本不起作用