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.

Latest version 4.0.0 has a leak somewhere - all NodeJS threads are left opened after stopping Lerna on Windows

See original GitHub issue

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)

  1. You can git clone my project Slickgrid-Universal
  2. Upgrade to Lerna 4.0.0, on this line
  3. Follow the installation instructions of my project
  4. Start the project via the npm script npm run dev:watch
  5. 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. image

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:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:13

github_iconTop GitHub Comments

21reactions
dman777commented, Mar 14, 2021

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.

21reactions
dman777commented, Mar 8, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to run lerna's command - node.js - Stack Overflow
Try running the command npm install --g lerna.
Read more >
lerna - Bountysource
After hitting lerna bootstrap to install all packages dependencies, ... Latest version 4.0.0 has a leak somewhere - all NodeJS threads are left...
Read more >
how to install express in console Code Example
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). ... E: The repository 'http://ppa.launchpad.net/certbot/certbot/ ...
Read more >
Release Notes - Documentation ・ CoreMedia
This manual contains the release notes for all CoreMedia Content Cloud releases. You will find the latest version of this manual at the...
Read more >
A fun community for developers to connect over ... - devRant
A community of over 30000 software developers who really understand what’s got you feeling like a coding genius or like you’re surrounded by...
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