Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to stop nx process with CTRL-C when using a nxCloudAccessToken #22998

Closed
1 of 4 tasks
SuneRadich opened this issue Apr 25, 2024 · 3 comments
Closed
1 of 4 tasks

Comments

@SuneRadich
Copy link

SuneRadich commented Apr 25, 2024

Current Behavior

If I have an nxCloudAccessToken in my nx.json file, I am unable to stop nx serve and nx build commands using CTRL-C in a terminal. This happens both in VS Code, and in the default OSX Terminal app. It has been working fine in the past. As far as I can recall, it worked fine last week.

If I remove "nxCloudAccessToken": "XXXXX" from nx.json, things work as expected, and I am able to stop my serve command.

It seems that if nx tries to use the distributed cache, the terminal is affected in some way.

The git repo I link in this issue is a brand new nx 17.3.1 repo, and the repo contains a single branch with the only change being that I ran nx connect. The main branch works fine, the withToken branch does not.

When running nx serve test on the withToken branch I can see ^D being shown in the terminal, this is not shown in the main branch. See the two videos below:

with-token.mov
whithout-token.mov

Expected Behavior

I expect to be able to stop nx serve or nx build by issuing CTRL-C, and not having to kill the entire terminal.

GitHub Repo

https://github.com/SuneRadich/nx-token-issue

Steps to Reproduce

  1. Run npx create-nx-workspace@17.3.1 (naming the repo and app test)
  2. Run nx connect
  3. Run nx serve test
  4. Note that you are unable to stop the serve by issuing CTRL-C

Nx Report

>  NX   Report complete - copy this into the issue template

   Node   : 18.17.1
   OS     : darwin-arm64
   npm    : 9.6.7
   
   nx (global)        : 17.3.1
   nx                 : 17.3.1
   @nx/js             : 17.3.1
   @nx/jest           : 17.3.1
   @nx/linter         : 17.3.1
   @nx/eslint         : 17.3.1
   @nx/workspace      : 17.3.1
   @nx/angular        : 17.3.1
   @nx/cypress        : 17.3.1
   @nx/devkit         : 17.3.1
   @nx/eslint-plugin  : 17.3.1
   @nx/nest           : 17.3.1
   @nx/node           : 17.3.1
   @nx/plugin         : 17.3.1
   @nx/storybook      : 17.3.1
   @nrwl/tao          : 17.3.1
   @nx/web            : 17.3.1
   @nx/webpack        : 17.3.1
   typescript         : 5.3.3
   ---------------------------------------
   Community plugins:
   @ngneat/transloco       : 5.0.7
   @ngrx/component-store   : 17.0.1
   @ngrx/effects           : 17.0.1
   @ngrx/entity            : 17.0.1
   @ngrx/router-store      : 17.0.1
   @ngrx/schematics        : 17.0.1
   @ngrx/store             : 17.0.1
   @ngrx/store-devtools    : 17.0.1
   @storybook/angular      : 7.6.12
   ng2-charts              : 4.1.1
   ngrx-immer              : 2.2.0
   ngx-extended-pdf-viewer : 19.7.1
   ---------------------------------------
   Local workspace plugins:
         @velliv/generate

Failure Logs

No response

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

At work, we have experienced this on at least three different Macbooks, but the issue does not seem to hit Windows 11 users.

@SuneRadich
Copy link
Author

Update: It seems to be tied to the Node version I am running (18.17.1). If I update to Node to latest LTS (20.12.2) then the problem goes away.

So my guess is, that this is somehow tied to Node 18, and some update on OSX.

@hamidrezahanafi
Copy link

Same issue on node 20.11.1
Upgrading to 20.12.2 fixed it

@rikas
Copy link

rikas commented May 8, 2024

I can confirm that with 20.12.2 the issue is finally gone! This was VERY annoying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants