Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@bastien70

Description

@bastien70

Hello, I tried to upgrade webpack-encore on a Symfony 5.3 project

I followed the doc well, and upgraded webpack-encore and stimulus. I also modified the controllers.json as shown.

But when I try the npm run dev command, I have the following error:

[webpack-cli] Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.module.rules[3].type should be one of these:
   "javascript/auto" | "javascript/dynamic" | "javascript/esm" | "json" | "webassembly/experimental"
   -> Module type to use for the module
 - configuration.output has an unknown property 'assetModuleFilename'. These properties are valid:
   object { auxiliaryComment?, chunkCallbackName?, chunkFilename?, chunkLoadTimeout?, crossOriginLoading?, devtoolFallbackModuleFilenameTemplate?, devtoolLineToLine?, devtoolModuleFilenameTemplate?, devtoolNamespace?, filename?, futureEmitAssets?, globalObject?, hashDigest?, hashDigestLength?, hashFunction?, hashSalt?, hotUpdateChunkFilename?, hotUpdateFunction?, hotUpdateMainFilename?, jsonpFunction?, jsonpScriptType?, library?, libraryExport?, libraryTarget?, path?, pathinfo?, publicPath?, sourceMapFilename?, sourcePrefix?, strictModuleExceptionHandling?, umdNamedDefine?, webassemblyModuleFilename? }
   -> Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.

image

I tried modifying my webpack.config.js leaving only the bare minimum to see if it came from that. But the problem persists so I don't understand where it came from

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugBug Fix

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions