NX Dev: neverConnectToCloud is true but NX still connects to the cloud

We are using nx for one of our projects, and it is advocating for enabling the nx-cloud cache. This is fine until you find out you need to claim the workspace and do things you don’t care about.

If you fail to do so up to 7 days from the creation time, the builds are going to fail with:

Error when connecting to Nx Cloud. Code: ERR_BAD_REQUEST. Error: This workspace is more than a week old and is unclaimed. Workspaces must be claimed within 7 days of creation. Claim your workspace at ...

We found this unnecessary, so we decided to switch off the nx-cloud, following the docs, but the CLI still tried to connect to nx-cloud.

The fix was to replace the default tasks runner from nx-cloud to with nx/tasks-runners/default, example:

{
  ...
  "tasksRunnerOptions": {
    "default": {
      "runner": "nx/tasks-runners/default"
      ...
    }
  }
}


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.