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.

memoryLimit / maxWorkers for nx serve

See original GitHub issue
  • I am running the latest version
  • I checked the documentation (nx.dev) and found no answer
  • I checked to make sure that this issue has not already been filed
  • I’m reporting the issue to the correct repository (not related to React, Angular or any dependency)

Expected Behavior

memoryLimit and maxWorkers options are available for nx serve

Current Behavior

Using --memoryLimit flag causes an error like this:

Schema validation failed with the following errors:
  Data path "" should NOT have additional properties(maxWorkers).

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Run nx serve --maxWorkers=1

Context

Please provide any relevant information about your setup:

@nrwl/angular : Not Found @nrwl/cli : 9.2.2 @nrwl/cypress : Not Found @nrwl/eslint-plugin-nx : 9.1.2 @nrwl/express : Not Found @nrwl/jest : 9.2.2 @nrwl/linter : 9.2.1 @nrwl/nest : 9.2.2 @nrwl/next : Not Found @nrwl/node : 9.2.1 @nrwl/react : Not Found @nrwl/schematics : Not Found @nrwl/tao : 9.2.2 @nrwl/web : Not Found @nrwl/workspace : 9.2.2 typescript : 3.8.3

Ref #2716: It would be great to have those flags not only work for building but also serving an application. My development machine only has so much RAM available and I’m constantly hitting 95-99% RAM usage while developing inside WSL 2. Plus, I really don’t need 6 workers@2GB, it’s too much.

Maybe it’s a usage problem and this is possible, if so, where can I find this in the documentation?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:7
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

26reactions
yeomanncommented, Aug 18, 2020

thanks man @alexesca i am using nx with Nest project, added in workspace.json for the main “architect.build.options” and it worked. nice trick

edit: i added memoryLimit as well, seems to be working image image

7reactions
yeomanncommented, Aug 17, 2020

is there any update? My laptop is 16gb but it is DIEing very badly

Read more comments on GitHub >

github_iconTop Results From Across the Web

nx serve <app> - Fig.io
Serve an Nx app. ... --memoryLimit <arg>, Memory limit for type checking service process in MB. --maxWorkers <arg>, Number of workers to use...
Read more >
@nrwl/web:dev-server | Nx
Serve a web application. Options can be configured in project.json when defining the ... Memory limit for type checking service process in MB...
Read more >
nrwl-nx/community - Gitter
Kinda wanted to use Express to serve the React app haha unless I need to write a post build ... Using 6 workers...
Read more >
Configuring Jest
Set reference to mongod in order to close the server during teardown. globalThis.__MONGOD__ = mongod; ... maxWorkers [number | string]​.
Read more >
A brand new website interface for an even better experience!
memoryLimit / maxWorkers for nx serve. ... Legal. Terms of Service · Privacy Policy; Copyright ©2020, Bountysource Inc.
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