Error
Build error occurred
ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration has an unknown property 'compiler'. These properties are valid:
object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry?, experiments?, extends?, externals?, externalsPresets?, externalsType?, ignoreWarnings?, infrastructureLogging?, loader?, mode?, module?, name?, node?, op
timization?, output?, parallelism?, performance?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, snapshot?, stats?, target?, watch?, watchOptions? }
-> Options object as provided by the user.
For typos: please correct them.
For loader options: webpack >= v2.0.0 no longer allows custom properties in configuration.
Loaders should be updated to allow passing options via loader options in module.rules.
Until loaders are updated one can use the LoaderOptionsPlugin to pass these options to the loader:
plugins: [
new webpack.LoaderOptionsPlugin({
// test: /\.xxx$/, // may apply this only for some modules
options: {
compiler: …
}
})
]
at validate (E:\xampp01\htdocs\wx-saas\local-note02\node_modules\next\dist\compiled\schema-utils3\index.js:1:150822)
at validateSchema (E:\xampp01\htdocs\wx-saas\local-note02\node_modules\next\dist\compiled\webpack\bundle5.js:28:1422089)
at create (E:\xampp01\htdocs\wx-saas\local-note02\node_modules\next\dist\compiled\webpack\bundle5.js:28:1467704)
at webpack (E:\xampp01\htdocs\wx-saas\local-note02\node_modules\next\dist\compiled\webpack\bundle5.js:28:1468341)
at f (E:\xampp01\htdocs\wx-saas\local-note02\node_modules\next\dist\compiled\webpack\bundle5.js:28:895636)
at E:\xampp01\htdocs\wx-saas\local-note02\node_modules\next\dist\build\compiler.js:35:47
at new Promise (
)
at runCompiler (E:\xampp01\htdocs\wx-saas\local-note02\node_modules\next\dist\build\compiler.js:34:12)
at E:\xampp01\htdocs\wx-saas\local-note02\node_modules\next\dist\build\webpack-build\impl.js:192:79
at Span.traceAsyncFn (E:\xampp01\htdocs\wx-saas\local-note02\node_modules\next\dist\trace\trace.js:154:26) {
errors: [
{
keyword: 'additionalProperties',
dataPath: '',
schemaPath: '#/additionalProperties',
params: [Object],
message: 'should NOT have additional properties',
schema: false,
parentSchema: [Object],
data: [Object]
}
],
Solution