question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lerna v4 leaves orphaned child processes

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:22
  • Comments:5

github_iconTop GitHub Comments

4reactions
mancioshellcommented, Nov 12, 2021

Any update? i have the same issue

2reactions
JamesHenrycommented, Jun 7, 2022

Thanks all!

This should hopefully be fixed by @feryardiant change, applied in https://github.com/lerna/lerna/pull/3156

Read more comments on GitHub >

github_iconTop Results From Across the Web

@lerna/child-process - npm
Lerna's internal child_process wrapper. Latest version: 6.0.3, last published: 9 days ago. Start using @lerna/child-process in your project ...
Read more >
Lerna 5.1 - New website, new guides, new Lerna example repo ...
#2946 from @feryardiant means that there will no longer be issues with orphaned child processes on Windows when using Lerna's legacy task runners....
Read more >
@lerna/validation-error: Versions | Openbase
Full version history for @lerna/validation-error including change logs. ... utils: orphaned child process on Windows (#3156) (7e69e9e) ...
Read more >
The Politics of Inclusion during and after the Armenian ...
“'Rescued and Safe': Armenian Orphans and the Experience of Genocide,” ... 528 LERNA EKMEKCIOGLU massacred, women, children, and older men were put on ......
Read more >
Lerna Kill Background Processes In Yarn Workspace?
Runs currently executing tasks to completion before exiting.This prevents the risk of having orphaned child processes running after lage has ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found