Orphaned child processes keep running when exiting `lerna run` with an error
See original GitHub issueI’m running the command lerna run --stream --parallel start
and if one of the apps has an error the others can be left running even as the lerna process exits.
Expected Behavior
I expect all child processes to be killed when lerna exits.
Current Behavior
Lerna orphans processes
Possible Solution
I’m not familiar enough with the code 😦
Steps to Reproduce (for bugs)
- Create the default project
- Create two apps, one is a simple nodejs express app, the other try
exit 1
in the “start” script in package.json lerna run --stream --parallel start
The fact that the nodejs app starts fine but the other app exits is causing the node.exe process to be orphaned.
{
"packages": [
"apps/**"
],
"version": "0.0.0"
}
Context
I just want to call npm start
and have it start multiple apps in my mono repo. Then press Ctrl+C
to stop them all, repeat.
Your Environment
I am running on windows, I have seen this behavior in both WSL and git bash. One of my apps just has docker-compose up
as the script which starts up some containers like my db. If docker isn’t running then this crashes for this reason. Also my app runs ngrok which also becomes orphaned.
Executable | Version |
---|---|
lerna --version |
3.15.0 |
npm --version |
6.10.2 |
yarn --version |
N/A |
node --version |
v12.8.0 |
OS | Version |
---|---|
Windows 10 Pro | 1903 |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:19
- Comments:38 (4 by maintainers)
Top GitHub Comments
We tested this version with our repository and it caused other issues of the process continually respanwning.
Downgrading to Lerna 3.22.1 seems to fix this issue. For now anyone who wants to use Lerna in a Windows environment should probably lock their dependency to that version.
any update? facing the issue on windows 11 with lerna 4.0.0