报错情况:------------>>
npm init webpack demo
创建一个新项目,然后执行:
npm run dev
之后项目报错,提示错误如下:
No values are specified for these options: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
的版本和webpack-dev-server的版本不兼容,
解决方法---------->>
卸载新版本,安装老版本。
举个例子:
npm remove webpack-dev-server
npm install webpack-dev-server@2.9.1
npm run dev
webpack-dev-server@2.10.0
有bug.