解决vue-cli + webpack 新建项目出错的问题
今日使用 npm init webpack love 创建一个新项目,然后执行 npm run dev 之后项目报错,提示错误如下:
没有给这些选项指定值:config-name, context, entry, module-bind, module-bind-post, module-bind-pre, output-path, output-filename, output-chunk-filename, output-source-map-filename, output-public-path, output-jsonp-function, output-library, output-library-target, records-input-path, records-output-path, records-path, define, target, watch-aggregate-timeout, devtool, resolve-alias, resolve-extensions, resolve-loader-alias, optimize-max-chunks, optimize-min-chunk-size, prefetch, provide, plugin, open-page 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:
经过排查,发现是 webpack 的新版本的BUG,解决方法就是卸载新版本,安装老版本。
命令如下:
npm remove webpack-dev-server npm install [email protected] npm run dev
然后项目就正常了。目前确定是 [email protected] 的 BUG。在其发布新版本解决问题之前,先安装老版本解决问题吧。
如果不能解决问题,请在评论中留言。
相关推荐
hline 2020-07-29
不知道该写啥QAQ 2020-07-18
helloxiaoliang 2020-06-21
不知道该写啥QAQ 2020-11-12
webfullStack 2020-11-09
Yvettre 2020-09-15
想做大牛的蜗牛 2020-10-30
gloria0 2020-10-26
gaojie0 2020-09-11
SelinaChan 2020-08-14
不知道该写啥QAQ 2020-08-09
gloria0 2020-08-09
不知道该写啥QAQ 2020-08-02
SelinaChan 2020-07-28
wangdianyong 2020-07-23
webpackvuees 2020-07-23
yqoxygen 2020-07-20
waterv 2020-07-18