Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid options object: options has an unknown property 'running' (webpack-cli v4.10.0) #5088

Closed
yvele opened this issue Mar 5, 2024 · 1 comment · Fixed by #5089
Closed

Comments

@yvele
Copy link

yvele commented Mar 5, 2024

Bug report

Actual Behavior

Using:

  • webpack v5.90.3
  • webpack-cli v4.10.0 ⚠️
  • webpack-dev-server v5.0.2

I get the following error:

[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 'running'. These properties are valid:
   object { allowedHosts?, bonjour?, client?, compress?, devMiddleware?, headers?,
   historyApiFallback?, host?, hot?, ipc?, liveReload?, onListening?, open?, port?, proxy?,
   server?, setupExitSignals?, setupMiddlewares?, static?, watchFiles?, webSocketServer? }

I'm not using running at all in my config.

Expected Behavior

It should work with webpack-cli v4.10.0 as the v5 migration documentation states that:

Minimum compatible webpack-cli version is 4.7.0 but we recommend using the latest version.

Note that I'm stuck with webpack-cli v4 because of webpack/webpack-cli#3559

How Do We Reproduce?

Basic repository repro: https://github.com/yvele/webpack-dev-server-repro

options has an unknown property '_assetEmittingPreviousFiles'.

Note that upgrading webpack-cli fixes the problem:

- "webpack-cli": "4.10.0"
+ "webpack-cli": "5.1.4"

Please paste the results of npx webpack-cli info here, and mention other relevant information

  System:
    OS: macOS 14.3.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 557.83 MB / 16.00 GB
  Binaries:
    Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm
  Browsers:
    Chrome: 122.0.6261.94
    Edge: 122.0.2365.63
    Firefox: 122.0.1
    Safari: 17.3.1
  Packages:
    babel-loader: ~9.1.3 => 9.1.3
    copy-webpack-plugin: ~12.0.2 => 12.0.2
    fork-ts-checker-webpack-plugin: ~9.0.2 => 9.0.2
    string-replace-loader: ~3.1.0 => 3.1.0
    style-loader: ~3.3.4 => 3.3.4
    terser-webpack-plugin: ~5.3.10 => 5.3.10
    webpack: ~5.90.3 => 5.90.3
    webpack-cli: ~4.10.0 => 4.10.0
    webpack-dev-server: ~5.0.2 => 5.0.2
yvele added a commit to yvele/webpack-dev-server-repro that referenced this issue Mar 5, 2024
@alexander-akait
Copy link
Member

You can't use "webpack-cli": "4.10.0" with webpack-dev-server v5, it is a breaking change, just a typo, we need to fix migration guide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants