Skip to content

[Bug] "Parcel.watch()" instruction ends even if the server is not yet ready #10152

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

Open
anemer opened this issue May 12, 2025 · 0 comments
Open

Comments

@anemer
Copy link

anemer commented May 12, 2025

🐛 bug report

Parcel watcher (Parcel.watch()) seems to end before server is actualy ready.

🎛 Configuration

  const port = 1234;
  const bundler = new Parcel({
    entries: "./index.html",
    defaultConfig: "@parcel/config-default",
    serveOptions: { port },
  });
  await bundler.watch();

reproduction steps: microsoft/playwright#35879 (comment)

Package.json : https://github.com/testndev/bugs-report-reproduction/blob/main/package.json

🤔 Expected Behavior

Parcel should return the hand at least with server up.

😯 Current Behavior

Parcel returns the hand even if server is not ready yet.

Requesting the server just after the end of bundler.watch() returns a net::ERR_CONNECTION_REFUSED error with Playwright for example.

page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:1234/

note: frequent but not systematic behavior.

🔦 Context

The bug was first open at Playwright: microsoft/playwright#35879

I have some scripts (with Playwright) that request a web app served by Parcel.

For example to take a PDF snapshot of "functional test coverage page".

💻 Code Sample

See : https://github.com/testndev/bugs-report-reproduction

🌍 Your Environment

Software Version(s)
Parcel 2.14.4 & 2.15.0
Node 23.11.0
npm/Yarn npm: 10.9.2
Operating System Ubuntu 24.04.2

See also: microsoft/playwright#35879

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

1 participant