Skip to content

V6 upgrade cli error - Invalid options for dev server #526

@devsheva

Description

@devsheva

Notice: A bug is a crash or incorrect behavior. If you have a debugging or troubleshooting question, please open a discussion on the Discussions Tab. Otherwise, remove this line and fill out the following sections.

Expected behavior:

Following the V6 upgrade guide to migrate from webpacker 5.x to 6.0.0rc should work fine when compiling assets and running dev-server

Actual behavior:

Trying to even launch the dev server command manually leads to this error.

npx webpack serve

[webpack-cli] Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
 - options has an unknown property '_assetEmittingPreviousFiles'. These properties are valid:
   object { allowedHosts?, bonjour?, client?, compress?, devMiddleware?, headers?, historyApiFallback?, host?, hot?, ipc?, liveReload?, onListening?, open?, port?, proxy?, server?, app?, setupExitSignals?, setupMiddlewares?, static?, watchFiles?, webSocketServer? }

Small, reproducible repo:

cannot easily provide unfortunately

Setup environment:

  • Ruby version: 2.7.4
  • Rails version: 6.1
  • Webpacker version: 6.0.0rc6
  • webpack: 5.96.1
  • webpack-cli: 4.10.0
  • webpack-dev-server 5.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions