Rumah  >  Artikel  >  hujung hadapan web  >  vue-cli+webpack无法新建项目

vue-cli+webpack无法新建项目

php中世界最好的语言
php中世界最好的语言asal
2018-06-15 14:32:251589semak imbas

这次给大家带来vue-cli+webpack无法新建项目,处理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! love@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 love@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:

经过排查,发现是 webpack 的新版本的BUG,解决方法就是卸载新版本,安装老版本。

命令如下:

npm remove webpack-dev-server
npm install webpack-dev-server@2.9.1
npm run dev

然后项目就正常了。目前确定是 webpack-dev-server@2.10.0 的 BUG。在其发布新版本解决问题之前,先安装老版本解决问题吧。

相信看了本文案例你已经掌握了方法,更多精彩请关注php中文网其它相关文章!

推荐阅读:

mint-ui在手机端做出下拉刷新与上拉加载

p5.js做出礼花绽放动画

Atas ialah kandungan terperinci vue-cli+webpack无法新建项目. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!

Kenyataan:
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn