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

Very slow build time and hot reload time during development #30112

Open
1 of 4 tasks
messerbill opened this issue Feb 19, 2025 · 0 comments
Open
1 of 4 tasks

Very slow build time and hot reload time during development #30112

messerbill opened this issue Feb 19, 2025 · 0 comments

Comments

@messerbill
Copy link

Current Behavior

Hey everyone,
since I updated to nx 20.x (coming form v 17.x) starting my backend apps (express.js) is very slow and it also takes a long time until code changes are noticed and reloaded during development. Especially when I run multiple microservices inside the monorepo it leads to very high memory usage - much more than before. Back in the days this was no problem at all.

Is this a known issue?

I also receive several deprecation warnings since the update, just like this one:

npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.

which comes from an outdated version of glob as far as I could debug it. Could it be related to the issue? My system seems to have problems when I run multiple instances of my backend apps in my monorepo (what was no problem before) and sometimes even leads to a complete freeze.

lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 24.04.2 LTS
Release:    24.04
Codename:    noble

node -v
v22.13.1

npm -v
10.9.2

"nx": "20.4.0",

This is only a problem with my backend apps. My frontend react apps (via vite) do not struggle at all.

Expected Behavior

I'd expect the monorepo (especially the backend node apps) to run with a much higher performance (especially when it comes to a hot reload after a lib was changed which is used by multiple backend apps).

GitHub Repo

No response

Steps to Reproduce

  1. create a lib with some code
  2. create 3-4 express.js apps in the monorepo using that lib
  3. make changes inside the lib
  4. have a look at the memory usage and performance while hot reloading

Nx Report

npx nx report

 NX   Report complete - copy this into the issue template

Node           : 22.13.1
OS             : linux-x64
Native Target  : x86_64-linux
npm            : 10.9.2

nx                     : 20.4.0
@nx/js                 : 20.4.0
@nx/jest               : 20.4.0
@nx/eslint             : 20.4.0
@nx/workspace          : 20.4.0
@nx/devkit             : 20.4.0
@nx/esbuild            : 20.4.0
@nx/eslint-plugin      : 20.4.0
@nx/express            : 20.4.0
@nx/module-federation  : 20.4.0
@nx/node               : 20.4.0
@nx/react              : 20.4.0
@nx/rollup             : 20.4.0
@nx/vite               : 20.4.0
@nx/web                : 20.4.0
typescript             : 5.7.3

Failure Logs

Package Manager Version

No response

Operating System

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

Additional Information

With nx v17.x this was no problem at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant