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
Latest version 4.0.0 has a leak somewhere - all NodeJS threads are left opened after stopping Lerna on Windows #2841
Comments
This does not happen in Unix like systems(MAC and Linux). Try doing in this in WSL if you must use Windows. Most development tools are native to Unix like systems. |
I can confirm that this problem is also affecting me. Unfortunately I can't change to unix due to contractor restrictions. |
As far as I know, Lerna is not currently intended to require using WSL to operate properly on Windows OS. I suspect most are more willing to move away from Lerna than to change their entire development environment. |
It's the developers responsibility to use the appropriate tools. You should be using a unix-like system if you are having memory issues. If you don't want to use WSL then try git bash. Regardless, this issue does not exist in unix-like systems. |
@dman777 The fact that the memory leak does not appear on unix systems does not make this a non-issue. You are not adding anything helpful to the discussion by suggesting that others stop using tools or environments that are intended to be supported by Lerna and NPM/Yarn. |
I respectfully disagree. I am offering something helpful with mentioning WSL and git bash. Both are freely available on Windows. |
Hey, @dman777 i appreciate your help by mentioning alternatives/workarounds. However for me a workaround is not a fix. If lerna doesn't want support windows natively in the future that's totally fine but it should be discussed in a separate ticket. |
Kindly make this issue generic for Linux and macOS environments. |
@SyedUmerHasan That does not show orphaned node threads spawned by lerna. |
Hi Folks 👋 You may or may not know that lerna is now under the stewardship of Nrwl (announcement here #3121), a company with a long history of not just producing valuable open-source software (OSS), but also backing others (at the time of writing, Nrwl has donated over $50,000 to OSS it hasn't created, see https://opencollective.com/nx for full details). Quite simply, Nrwl ❤️ OSS, and is committed to making lerna the best it can be. We use it ourselves. In order to take this awesome project forward from its current state, it is important that we focus our finite resources on what is most important to lerna users in 2022. With that in mind, we have identified this issue as being potentially stale due to its age and/or lack of recent activity. Next steps: We want to give you some time to read through this comment and take action per one of the steps outlined below, so for the next 14 days we will not make any further updates to this issue. @ghiscoding as the original author of this issue, we are looking to you to update us on the latest state of this as it relates to the latest version of lerna. Please choose one of the steps below, depending on what type of issue this is:
If we do not hear from @ghiscoding on this thread within the next 14 days, we will automatically close this issue. If you are another user impacted by this issue but it ends up being closed as part of this process, we still want to hear from you! Please simply head over to our new issue templates and fill out all the requested details on the template which applies to your situation: https://github.com/lerna/lerna/issues/new/choose Thank you all for being a part of this awesome community, we could not be more excited to help move things forward from here 🙏 🚀 |
@JamesHenry the fix is in PR #2946, which is 1 line code change, it simply needs to be merged. I also validated that the PR fix does work on my Windows machine, so whenever PR #2946 gets merged then this issue can be closed |
@ghiscoding Thanks a lot for confirming that! I've requested an update on the PR, hopefully we can get it out in the |
@feryardiant change was applied in #3156 Thanks again! |
Expected Behavior
I saw the latest version of Lerna got bumped to 4.0.0 and I saw that it was mainly related to updating a whole bunch of dependencies, unfortunately it seems to be leaking somewhere. I tried my project on 3 different computers and they all leak with latest version of Lerna. At first, I thought it was TypeScript but after trying to upgrade/downgrade every npm packages that changed in the last couple days, I found out it's Lerna 4.0.0 causing the leak.
Current Behavior
I run my project in Development mode via
lerna run build:demo --parallel
and when I stop the execution, all of the NodeJS threads remain open (I didn't count them 1 by 1 but I see a whole lot staying open after stopping the process).Possible Solution
Downgrading to previous version
3.22.1 does fix the issue in my case, so I know there's something wrong
4.0.0`Steps to Reproduce (for bugs)
npm run dev:watch
I then have to go and end all threads manually to get rid of the opened threads, it's painful and for that reason I have to downgrade back to Lerna
3.22.1
and that fixes it. Also note that I tried multiple times, upgrade/downgrade and it's consistently does the same, a downgrade always fixes it while an upgrade consistently breaks and does the behavior described in this issue.Context
Keeping all my npm packages up to date
Your Environment
Windows 10 environment, ranging from Windows 10 (build 2003) at work to insider builds (20H2) on 2 of my personal computers. So in total I tried on 3 different computers with the same project.
lerna --version
npm --version
yarn --version
node --version
The text was updated successfully, but these errors were encountered: