为了账号安全,请及时绑定邮箱和手机立即绑定

第2-3节 npm run dev报错

> vuefile@1.0.0 dev E:\vuefile

> cross-env NODE_ENV=development webpack-dev-server --config webpack.config.js


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 'historyFallback'. 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?, before?, after?, stats?, reporter?, reportTime?, noInfo?, quiet?, serverSideRender?, index?, log?, warn? }

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! vuefile@1.0.0 dev: `cross-env NODE_ENV=development webpack-dev-server --config webpack.config.js`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the vuefile@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:

npm ERR!     C:\Users\yeqb\AppData\Roaming\npm-cache\_logs\2018-01-29T08_19_22_145Z-debug.log

错误代码如上,有大神指导吗?

正在回答

1 回答

去掉 historyFallback 的配置

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
Vue+Webpack打造todo应用
  • 参与学习       84606    人
  • 解答问题       787    个

用前端最热门框架Vue+最火打包工具Webpack打造todo应用

进入课程

第2-3节 npm run dev报错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信