vue-cli+webpack cannot create a new project

php中世界最好的语言
Release: 2018-06-15 14:32:25
Original
1563 people have browsed it

This time I will bring you vue-cli webpack’s inability to create a new project. What are the precautions for dealing with vue-cli webpack’s inability to create a new project? The following is a practical case, let’s take a look.

Today I used npm init webpack love to create a new project, and then executed npm run dev. After the project reported an error, the error message was 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, which was solved. The method 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.

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Recommended reading:

mint-ui makes pull-down refresh and pull-up loading on the mobile phone

p5.js Make fireworks bloom animation

The above is the detailed content of vue-cli+webpack cannot create a new project. 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