Solve the problem of errors in new vue-cli + webpack projects

亚连
Release: 2018-05-25 17:23:24
Original
1487 people have browsed it

Below I will share with you an article that solves the problem of errors in the new vue-cli webpack project. It has a good reference value and I hope it will be helpful to everyone.

Use npm init webpack love to create a new project today. project, and then execute npm run dev, the project reports an error, and the error message is as follows:

没有给这些选项指定值: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:
Copy after login

After investigation, it was found that it was a BUG in the new version of webpack. The solution is to uninstall the new version and install the old version.

The command is as follows:

npm remove webpack-dev-server npm install webpack-dev-server@2.9.1 npm run dev
Copy after login

Then the project will be normal. It is currently determined to be a BUG in webpack-dev-server@2.10.0. Before it releases a new version to solve the problem, install the old version to solve the problem.

The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.

Related articles:

Solutions to how to quickly refresh the Ajax submission form page

Two issues when Ajax opens a new window and is blocked by the browser A solution

ajax implements asynchronous file or image upload function

The above is the detailed content of Solve the problem of errors in new vue-cli + webpack projects. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn