ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.entry['unmatchedFiles'] should be a non-empty array.
-> All modules are loaded upon startup. The last one is exported.
at validate (\node_modules\.pnpm\schema-utils@3.3.0\node_modules\schema-utils\dist\validate.js:191:11)
at validateSchema (\node_modules\.pnpm\webpack@5.93.0_@swc+core@1.7.6_@swc+helpers@0.5.12__webpack-cli@5.1.4\node_modules\webpack\lib\validateSchema.js:78:2)
at create (\node_modules\.pnpm\webpack@5.93.0_@swc+core@1.7.6_@swc+helpers@0.5.12__webpack-cli@5.1.4\node_modules\webpack\lib\webpack.js:130:24)
at webpack (\node_modules\.pnpm\webpack@5.93.0_@swc+core@1.7.6_@swc+helpers@0.5.12__webpack-cli@5.1.4\node_modules\webpack\lib\webpack.js:182:32)
at Object.f [as default] (\node_modules\.pnpm\webpack@5.93.0_@swc+core@1.7.6_@swc+helpers@0.5.12__webpack-cli@5.1.4\node_modules\webpack\lib\index.js:75:16)
at ge (\node_modules\.pnpm\instant-mocha@1.5.2_mocha@10.7.0_webpack@5.93.0_@swc+core@1.7.6_@swc+helpers@0.5.12__webpack-cli@5.1.4_\node_modules\instant-mocha\dist\cli.js:6:1935)
at be (\node_modules\.pnpm\instant-mocha@1.5.2_mocha@10.7.0_webpack@5.93.0_@swc+core@1.7.6_@swc+helpers@0.5.12__webpack-cli@5.1.4_\node_modules\instant-mocha\dist\cli.js:6:3232)
at async Object.handler (\node_modules\.pnpm\instant-mocha@1.5.2_mocha@10.7.0_webpack@5.93.0_@swc+core@1.7.6_@swc+helpers@0.5.12__webpack-cli@5.1.4_\node_modules\instant-mocha\dist\cli.js:6:3990) {
errors: [
{
keyword: 'anyOf',
dataPath: '.entry',
schemaPath: '#/anyOf',
params: {},
message: 'should match some schema in anyOf',
schema: [Array],
parentSchema: [Object],
data: [Object],
children: [Array]
}
],
Bug description
instant-mocha throws error
Reproduction
git clone https://github.com/privatenumber/instant-mocha cd instant-mocha/tests/fixture // copy tests to test pnpx instant-mocha
Node.js package manager
pnpm
Environment
mocha 10
Can you contribute a fix?