Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
550 views
in Technique[技术] by (71.8m points)

Webpack运行报错

npm run dev 运行报这个错是配置的哪里错了

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration[0].entry should be one of these:
object { : non-empty string | [non-empty string] } | non-empty string | [non-empty string] | function
The entry point(s) of the compilation.
Details:
* configuration[0].entry['index/nav'] should be a string.
* configuration[0].entry['index/nav'][2] should be a string.
* configuration[0].entry['index/nav'] should be one of these:
non-empty string | [non-empty string]
* configuration[0].entry should be a string.
* configuration[0].entry should be an array:
[non-empty string]
* configuration[0].entry should be an instance of function
function returning an entry object or a promise..
### 题目描述

### 题目来源及自己的思路

### 相关代码
粘贴代码文本(请勿用截图)

### 你期待的结果是什么?实际看到的错误信息又是什么?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

配置文件导出的对象无效,入口配置报错。建议看看 webpack 官网的入口文件配置


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

18 comments

40.4k users

...