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

ConcurrentCompilationError when specifying devServer.port in multiple configurations #3666

Closed
alexdavid opened this issue Mar 1, 2023 · 2 comments

Comments

@alexdavid
Copy link

Bug report

When exporting multiple configurations, dev server seems to be aware that the ports must be different per config (it returns a helpful error if the ports are the same). However, if the ports are different it outputs the error:

[webpack-dev-middleware] ConcurrentCompilationError: You ran Webpack twice. Each instance only supports a single concurrent compilation at a time

and it seems to compile each configuration twice.

Actual Behavior

webpack serve returns a ConcurrentCompilationError, and outputs compilation information for each asset twice

Expected Behavior

webpack serve returns no error and outputs compilation for each asset once.

How Do We Reproduce?

Minimum reproducible repo here. Run yarn webpack serve and observe the error and that there are 4 compilation outputs instead of 2. Note that when removing the devServer from configuration it works as expected.

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

  System:
    OS: Linux 6.1 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (32) x64 AMD Ryzen 9 5950X 16-Core Processor
    Memory: 53.11 GB / 62.70 GB
  Binaries:
    Node: 18.12.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.19.2 - /usr/local/bin/npm
  Packages:
    webpack: ^5.75.0 => 5.75.0
    webpack-cli: ^5.0.1 => 5.0.1
    webpack-dev-server: ^4.11.1 => 4.11.1
@alexander-akait alexander-akait transferred this issue from webpack/webpack-dev-server Mar 13, 2023
@alexander-akait
Copy link
Member

alexander-akait commented Mar 13, 2023

outputs compilation information for each asset twice

#3604 (will be fixed soon)

webpack serve returns a ConcurrentCompilationError

#2408

Anyway you can ignore error mesage, because all works fine

@alexander-akait
Copy link
Member

Close in favor #2408 (comment)

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

No branches or pull requests

2 participants