Latest version 4.0.0 has a leak somewhere - all NodeJS threads are left opened after stopping Lerna on Windows
See original GitHub issueExpected 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)
- You can git clone my project Slickgrid-Universal
- Upgrade to Lerna 4.0.0, on this line
- Follow the installation instructions of my project
- Start the project via the npm script
npm run dev:watch
- Stop the process and see it leak (with Task Manager on Windows), it doesn’t seem to stop any of my threads. The print screen below was taken after stopping the Lerna command and as you can see it doesn’t look like any of the thread are being released.
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.
Executable | Version |
---|---|
lerna --version |
4.0.0 |
npm --version |
7.5.0 |
yarn --version |
1.19.0 |
node --version |
14.15.0 |
OS | Version |
---|---|
NAME | VERSION |
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:13
Top GitHub Comments
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.
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.