webpack 运行报错
来源:2-1 项目目录升级-一个正式项目的目录结构

香儿1314520
2019-05-07
修改分离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.
- configuration should be an object.
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中的数组。
感觉你应该是哪里的括号写错了
012019-05-08
相似问题
回答 2
回答 1