请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

webpack 运行报错

修改分离webpack.config.base.js 和webpack.config.client.js 后,报错:

vue-todo@1.0.0 dev D:\web学习\vue项目搭建\vue-todo
cross-env NODE_ENV=development webpack-dev-server --config build/webpack.config.client.js

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

  • configuration should be one of these:
    object | [object] | {
    “instanceof”: “Promise”,
    “description”: “A promise that resolves with a configuration object, or an array of configuration objects.”
    }
    Details:
    • configuration should be an object.
      -> A webpack configuration object.
    • configuration should be an array:
      [object]
      -> An array of webpack configuration objects.
    • configuration should be an instance of {
      “instanceof”: “Promise”,
      “description”: “A promise that resolves with a configuration object, or an array of configuration objects.”
      }
      -> A promise that resolves with a configuration object, or an array of configuration objects.
      Received: undefined : undefined
      npm ERR! code ELIFECYCLE
      npm ERR! errno 4294967295
      npm ERR! vue-todo@1.0.0 dev: cross-env NODE_ENV=development webpack-dev-server --config build/webpack.config.client.js
      npm ERR! Exit status 4294967295
      npm ERR!
      npm ERR! Failed at the vue-todo@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\lenovo\AppData\Roaming\npm-cache_logs\2019-05-07T12_21_15_745Z-debug.log

正在回答

1回答

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

这句话的意思 webpack被一个不符合api范式的对象初始化。

configuration should be one of these: 配置文件 应该如这些种类

A promise that resolves with a configuration object, or an array of configuration objects.

如一个对象object,或者一个在object中的数组。


感觉你应该是哪里的括号写错了

0 回复 有任何疑惑可以回复我~
  • 提问者 香儿1314520 #1
    合并赋值后的config单词写错了
    回复 有任何疑惑可以回复我~ 2019-05-08 07:17:09
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信