nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.26k stars 2.32k forks source link

@nx/js:node executor hangs while "watch": false option is set #27579

Open stomvi opened 3 weeks ago

stomvi commented 3 weeks ago

Current Behavior

Run node app serve:production target with "watch": false option set hangs at the end and shows To exit the process, press Ctrl+C before the output.

Expected Behavior

Shouldn't the process exit after execution?

GitHub Repo

No response

Steps to Reproduce

  1. npx create-nx-workspace@latest test --preset=node-standalone --framework=none --docker=false --useGitHub=false --nxCloud=skip
  2. cd test
  3. add "watch": false to the /project.json file at the targets.serve.configurations.production section
  4. run npx nx run test:serve:production

Nx Report

Node           : 20.15.1
OS             : darwin-arm64
Native Target  : aarch64-macos
npm            : 10.7.0

nx                 : 19.6.2
@nx/js             : 19.6.2
@nx/jest           : 19.6.2
@nx/linter         : 19.6.2
@nx/eslint         : 19.6.2
@nx/workspace      : 19.6.2
@nx/devkit         : 19.6.2
@nx/esbuild        : 19.6.2
@nx/eslint-plugin  : 19.6.2
@nx/node           : 19.6.2
@nrwl/tao          : 19.6.2
typescript         : 5.5.4
---------------------------------------
Registered Plugins:
@nx/eslint/plugin
@nx/jest/plugin

Failure Logs

No response

Package Manager Version

No response

Operating System

Additional Information

No response

podjames commented 3 weeks ago

We are running into the exact same problem. The watch: false flag also isn't being respected when we run a node executor via CLI.

PodStuart commented 2 weeks ago

Any idea when this might be fixed? We've not been able to update since this was introduced.

wewelll commented 1 week ago

We have the same issue with the latest NX version (19.6.5)