Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nx CLI run many command is not working for multiple apps

I have tried using Nx in an attempt to make use of Monorepos. I have been facing an issue to serve multiple apps via nx run-many command. Can anyone correct me if I'm doing something wrong?

Command used: nx run-many --target=serve --all

I can see the Nx Console logging all the available apps but only running one

>  NX  Running target serve for projects:
  - app1
  - app2
———————————————————————————————————————————————
> nx run app1:serve 
like image 543
Chan15 Avatar asked Dec 06 '25 09:12

Chan15


2 Answers

Try this:

nx run-many --parallel --target=serve --projects=frontend,backend 
like image 100
anoner66 Avatar answered Dec 08 '25 07:12

anoner66


nx run-many --target=serve --all --maxParallel=100 

The default value for --maxParallel is three, it means runs tasks in batches of three by default.

Additional, Exclude few apps to not serve then.

nx run-many --target=serve --all --maxParallel=100 --exclude=app-name

Github

like image 25
Dheeraj kumar Rao Avatar answered Dec 08 '25 07:12

Dheeraj kumar Rao



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!