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.
- 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:
- Created 3 years ago
- Reactions:7
- Comments:10 (3 by maintainers)
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

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