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

Lerna v4 leaves orphaned child processes #2901

Closed
FirstVertex opened this issue May 12, 2021 · 5 comments
Closed

Lerna v4 leaves orphaned child processes #2901

FirstVertex opened this issue May 12, 2021 · 5 comments

Comments

@FirstVertex
Copy link

In multiple packages we have a "start" command that launches webpack-dev-server or ng serve. In the root package.json we have a command that runs all these start commands

"scripts": {
   "start": "lerna run start --stream"
}

In Lerna v3, when that was running, I could kill it with CTRL+C, and then launch it again.

In Lerna v4, when I kill the command with CTRL+C, and subsequently launch it I always now receive EADDRINUSE for the port that the webservers are running on. As a workaround I use npm package kill-port to kill Lerna's orphaned child process running on that port, before I can run it again.

As a workaround we have downgraded to Lerna 3.22.1 - this is working as expected.

Lerna run has a --no-bail flag which would appear to control the behavior that this is doing, but we do not want the --no-bail behavior but it now seems to be the default and cannot be disabled.

This seems a broken approach to managing child processes and is a breaking change for those upgrading to v4.

@lerickson-ds
Copy link

I have this same issue as well. I would like CTRL + C to kill the port.

@mancioshell
Copy link

Any update? i have the same issue

@tutok
Copy link

tutok commented Jan 27, 2022

related #2284

@aviv-skillset
Copy link

Hi @JamesHenry, since Lerna is now being maintained by Nrwrl, and the Major version bumped again to 5, I would like to bump this issue again. Windows users are still stuck with major 3 because of orphan children.
Is the source of this bug known?
Is there anything I can do to help with locating the root cause and fix it?

@JamesHenry
Copy link
Member

Thanks all!

This should hopefully be fixed by @feryardiant change, applied in #3156

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

6 participants