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.

MaxListenersExceededWarning when lerna run --stream with 3+ packages

See original GitHub issue

Expected Behavior

I have 3 packages in my monorepo, each of them have a npm build script.

I run lerna run build --stream from the root folder, I expect to see the live output.

Current Behavior

I see the live output but also:

(node:48783) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 4 error listeners added. Use emitter.setMaxListeners() to increase limit

Possible Solution

Steps to Reproduce (for bugs)

https://github.com/amaurymartiny/cra-lerna-electron/tree/am-try-no-npm

yarn lint works. yarn lint --stream outputs the warning.

lerna.json

{
  "lerna": "2.11.0",
  "npmClient": "yarn",
  "packages": [
    "packages/*"
  ],
  "useWorkspaces": false,
  "version": "0.1.0"
}

lerna-debug.log

Context

Your Environment

Executable Version
lerna --version 2.11.0
npm --version 6.1.0
yarn --version 1.7.0
node --version 10.1.0
OS Version
macOS Sierra 10.13.4

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:17
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
seanconnollydevcommented, Dec 7, 2018

I see the same warning when I try to run bootstrap. bootstrap does not seem to support the --concurrency flag so I’m not sure how I can correct this.

0reactions
hugebducommented, Aug 27, 2019

@evocateur might that be there’s missing .unpipe call upon child’s process exit?

Read more comments on GitHub >

github_iconTop Results From Across the Web

lerna run --parallel not working for rollup watch - Stack Overflow
I have a lerna monorepo with yarn workspaces with two packages. I am using rollup as the bundler. packages/module1/package.json: { scripts: { " ......
Read more >
Your Jest Tests are Leaking Memory
Jest resets the require cache between each test run. This is really nice because it gives test suites complete isolation from each other....
Read more >
web3-net | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
npm-watch - Bountysource
npm-watch No task specified. Will go through all possible tasks (node:22572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected.
Read more >
Top-5 handy lerna flags for your monorepo
starts a package with the name 'server' lerna run --scope server start // starts all packages end up on '-server' lerna run --scope...
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