Skip to content
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

nx and yarn pnp memory leak #23015

Closed
1 of 4 tasks
WSINTRA opened this issue Apr 25, 2024 · 2 comments
Closed
1 of 4 tasks

nx and yarn pnp memory leak #23015

WSINTRA opened this issue Apr 25, 2024 · 2 comments

Comments

@WSINTRA
Copy link

WSINTRA commented Apr 25, 2024

Current Behavior

I have just started using NX for a react monorepo and noticed if I left the server running my Macbook would crash after a while.
I tried to track the problem and was able to reproduce it.
To reproduce the issue.

  • Create a new workspace
    npx create-nx-workspace@latest react-monorepo --preset=react-monorepo
  • Open activity monitor memory tab and filter node
  • cd into the newly created workspace and run
    yarn nx serve app-name
  • Observe the Activity monitor, memory usage should be stable around 450mb for a new workspace
  • Kill the server
  • In the directory from terminal run
    yarn --version
    // I get v1.22.18
  • then run
    yarn set version stable
    // now run yarn --version and you should be on 4.1.1
    *then:
    yarn config set nodeLinker pnp
    yarn install
  • run yarn serve.. again and observe the memory output. Here mine begins to slowly increase until crash (complete mac crash)

Expected Behavior

Not to eat all my memory up until my laptop crashes

GitHub Repo

No response

Steps to Reproduce

1.See above

Nx Report

NX   Report complete - copy this into the issue template

Node   : 20.0.0
OS     : darwin-x64
yarn   : 4.1.1

nx                 : 18.3.3
@nx/js             : 18.3.3
@nx/eslint         : 18.3.3
@nx/workspace      : 18.3.3
@nx/cypress        : 18.3.3
@nx/devkit         : 18.3.3
@nx/eslint-plugin  : 18.3.3
@nx/playwright     : 18.3.3
@nx/react          : 18.3.3
@nx/vite           : 18.3.3
@nx/web            : 18.3.3
typescript         : 5.4.5
---------------------------------------
Registered Plugins:
@nx/vite/plugin
@nx/eslint/plugin
@nx/playwright/plugin

Failure Logs

No response

Package Manager Version

Yarn 4.1.1

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

I have some videos of my Activity Monitor I can post if needed.
Screenshot 2024-04-25 at 3 56 47 PM

@WSINTRA
Copy link
Author

WSINTRA commented Apr 25, 2024

Upgraded node to LTS
nodejs/node#47566
Issue closed

@WSINTRA WSINTRA closed this as completed Apr 25, 2024
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant