webpack-dev-server报错
Posted ertingbo
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了webpack-dev-server报错相关的知识,希望对你有一定的参考价值。
运行npm run dev报错,----
webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! C:\Users\admin\AppData\Roaming\npm-cache\_logs\2019-03-26T03_47_45_865Z-debug.log
原因:这是新版webpack存在的BUG,卸载现有的新版本webpack,装老版本就好。
(1)npm uninstall webpack-dev-server
(2)npm install [email protected]
(3)npm run dev
以上是关于webpack-dev-server报错的主要内容,如果未能解决你的问题,请参考以下文章
webpack5输入指令npx webpack-dev-server 使用webpack-dev-server报错
webpack运行报错 webpack-dev-server.... 解决方法
vue运行报错webpack-dev-server: command not found
Vue 项目: npm run dev b报错 “'webpack-dev-server' 不是内部或外部命令,也不是可运行的程序 或批处理文件。”