webpack-dev-server报错

因为重装系统,重新安装了node,原来一切正常的webpack打包项目,现在出现了如下错误:
E:aa>webpack-dev-server
Invalid configuration object. webpack-dev-server has been initialised using a configuration object that does not match the API schema.

  • configuration has an unknown property 'error'. These properties are valid:
    object { hot?, hotOnly?, lazy?, bonjour?, host?, allowedHosts?, filename?, publicPath?, port?, socket?, watchOptions?, headers?, clientLogLevel?, overlay?, progress?, key?, cert?, ca?, pfx?, pfxPassphrase?, requestCert?, inline?, disableHostCheck?, public?, https?, contentBase?, watchContentBase?, open?, useLocalIp?, openPage?, features?, compress?, proxy?, historyApiFallback?, staticOptions?, setup?, stats?, reporter?, noInfo?, quiet?, serverSideRender?, index?, log?, warn? };

而且在npm install时,虽然能安装成功,但是老是会在开始抛出报错:
npm WARN package.json vue-demo@1.0.0 No description
npm WARN package.json vue-demo@1.0.0 No repository field.
npm WARN package.json vue-demo@1.0.0 No README data
npm WARN package.json Dependency 'babel-core' exists in both dependencies and devDependencies, using 'babel-core@^6.26.0' from dependencies
npm WARN package.json Dependency 'babel-loader' exists in both dependencies and devDependencies, using 'babel-loader@^7.1.2' from dependencies
npm WARN deprecated babel-preset-es2015@6.24.1: We're super � excited that you're trying to use ES2015 syntax, but instead of making more yearly presets � , Babel now has a better preset that we recommend you use instead: npm install babel-preset-env --save-dev. preset-env without options will compile ES2015+ down to ES5 just like using all the presets together and thus is more future proof. It also allows you to target specific browsers so that Babel can do less work and you can ship native ES2015+ to user � ! We are also in the process of releasing v7, so please give http://babeljs.io/blog/2017/0... a read and help test it out in beta! Thanks so much for using Babel �, please give us a follow on Twitter @babeljs for news on Babel, join slack.babeljs.io for discussion/development and help support the project at opencollective.com/babel
npm WARN engine webpack-dev-server@2.8.2: wanted: {"node":">=4.7"} (current: {"node":"4.4.3","npm":"2.15.1"})
npm WARN engine internal-ip@2.0.2: wanted: {"node":">=6"} (current: {"node":"4.4.3","npm":"2.15.1"})
npm WARN engine default-gateway@2.0.2: wanted: {"node":">=6"} (current: {"node":"4.4.3","npm":"2.15.1"})
npm WARN optional dep failed, continuing fsevents@1.1.2
npm WARN optional dep failed, continuing fsevents@1.1.2

阅读 5.1k
1 个回答

你新安装的node版本太低了,换一下安装高版本的,最好v6以上。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题