You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i followed below steps to create react project using nx and i added 3 projects names as app(port 4200), my-second-app(port 4201), my-third-app(port 4203).
nx g @nx/react:application my-third-app --directory apps/my-third-app
and i added custom script in package.json like
"scripts": {
"serve:all": "nx run-many --target=serve --all",
"build:all": "nx run-many --target=build --all"
}
and after running below the command only my-second-app and my-third-app only ruiing npm run build:all && npm run serve:all
[webpack-dev-server] Loopback: http://localhost:4201/ [webpack-dev-server] Content not from webpack is served from 'C:\Practice\sample\apps\my-second-app\public' directory [webpack-dev-server] Loopback: http://localhost:4202/ [webpack-dev-server] Content not from webpack is served from 'C:\Practice\sample\apps\my-third-app\public' directory
please help on this and find below logs for reference.
[webpack-dev-server] Project is running at: [webpack-dev-server] Loopback: http://localhost:4201/ [webpack-dev-server] Content not from webpack is served from 'C:\Practice\sample\apps\my-second-app\public' directory [webpack-dev-server] Loopback: http://localhost:4202/ [webpack-dev-server] Content not from webpack is served from 'C:\Practice\sample\apps\my-third-app\public' directory
KamakshiReddyADL
changed the title
nx run-many --target=build --all not serve all projects in windows os
nx run-many --target=serve --all not serve all projects in windows os.
Mar 7, 2025
Current Behavior
Hi Team,
i followed below steps to create react project using nx and i added 3 projects names as app(port 4200), my-second-app(port 4201), my-third-app(port 4203).
npx create-nx-workspace@latest sample
nx generate @nrwl/react:application app --style=css --routing --no-interactive
nx generate @nx/react:application my-second-app --style=css --routing --no-interactive
nx g @nx/react:application my-third-app --directory apps/my-third-app
and i added custom script in package.json like
"scripts": {
"serve:all": "nx run-many --target=serve --all",
"build:all": "nx run-many --target=build --all"
}
and after running below the command only my-second-app and my-third-app only ruiing
npm run build:all && npm run serve:all
[webpack-dev-server] Loopback: http://localhost:4201/
[webpack-dev-server] Content not from webpack is served from 'C:\Practice\sample\apps\my-second-app\public' directory
[webpack-dev-server] Loopback: http://localhost:4202/
[webpack-dev-server] Content not from webpack is served from 'C:\Practice\sample\apps\my-third-app\public' directory
please help on this and find below logs for reference.
$ npm run build:all && npm run serve:all
√ nx run my-second-app:build [local cache]
√ nx run my-third-app:build [local cache]
√ nx run app:build [local cache]
———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
NX Successfully ran target build for 3 projects (485ms)
Nx read the output from the cache instead of running the command for 3 out of 3 tasks.
NX Running target serve for 3 projects:
———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
[webpack-dev-server] Project is running at:
[webpack-dev-server] Loopback: http://localhost:4201/
[webpack-dev-server] Content not from webpack is served from 'C:\Practice\sample\apps\my-second-app\public' directory
[webpack-dev-server] Loopback: http://localhost:4202/
[webpack-dev-server] Content not from webpack is served from 'C:\Practice\sample\apps\my-third-app\public' directory
Entrypoint main [big] 1.64 MiB (2.21 MiB) = runtime.js 47.1 KiB vendor.js 1.54 MiB main.js 60.3 KiB 3 auxiliary assets
Entrypoint styles 234 KiB (385 KiB) = runtime.js 47.1 KiB styles.css 119 bytes styles.js 186 KiB 3 auxiliary assets
chunk (runtime: runtime) main.js (main) 56.6 KiB [initial] [rendered]
chunk (runtime: runtime) runtime.js (runtime) 31.7 KiB [entry] [rendered]
chunk (runtime: runtime) styles.css, styles.js (styles) 180 KiB (javascript) 80 bytes (css/mini-extract) [initial] [rendered]
chunk (runtime: runtime) vendor.js (vendor) (id hint: vendor) 1.51 MiB [initial] [rendered] split chunk (cache group: vendor) (name: vendor)
webpack compiled successfully (5a10f72a7184f5b0)
Type-checking in progress...
Entrypoint main [big] 1.64 MiB (2.21 MiB) = runtime.js 47.1 KiB vendor.js 1.54 MiB main.js 60.3 KiB 3 auxiliary assets
Entrypoint styles 234 KiB (385 KiB) = runtime.js 47.1 KiB styles.css 119 bytes styles.js 186 KiB 3 auxiliary assets
chunk (runtime: runtime) main.js (main) 56.6 KiB [initial] [rendered]
chunk (runtime: runtime) runtime.js (runtime) 31.7 KiB [entry] [rendered]
chunk (runtime: runtime) styles.css, styles.js (styles) 180 KiB (javascript) 80 bytes (css/mini-extract) [initial] [rendered]
chunk (runtime: runtime) vendor.js (vendor) (id hint: vendor) 1.51 MiB [initial] [rendered] split chunk (cache group: vendor) (name: vendor)
webpack compiled successfully (ab0a1d4cfdbb00f5)
Type-checking in progress...
No errors found.
No errors found.
Expected Behavior
should run all projects
GitHub Repo
No response
Steps to Reproduce
npx create-nx-workspace@latest sample
nx generate @nrwl/react:application app --style=css --routing --no-interactive
nx generate @nx/react:application my-second-app --style=css --routing --no-interactive
nx g @nx/react:application my-third-app --directory apps/my-third-app
Nx Report
Failure Logs
Package Manager Version
10.2.4
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: