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
fix(core): allow nx-cloud commands to run without local Nx installation (#31974)
## Current Behavior
When running nx-cloud commands like `nx start-ci-run` in environments
without local Nx installation, users get this error:
```
NX Could not find Nx modules at "/path/to/workspace".
Have you run npm/yarn install?
```
This prevents legitimate use of nx-cloud commands in CI environments
that don't have local Nx modules installed.
## Expected Behavior
nx-cloud commands should be able to run using the global Nx installation
without requiring local Nx modules, since they're designed to work
independently of the local workspace setup.
## Related Issue(s)
This fixes scenarios where users run `nx start-ci-run` in CI
environments without local Nx installation.
## Changes Made
- Added `isNxCloudCommand()` function to identify nx-cloud commands:
`start-ci-run`, `login`, `logout`, `connect`, `view-logs`, `fix-ci`,
`record`
- Modified the missing local installation check to exclude nx-cloud
commands
- Added execution path for nx-cloud commands when no local Nx is
available - they now run via the global nx-commands module
- Preserves the error check for regular Nx commands that require local
installation
## Testing
- Verified that nx-cloud commands are properly identified
- Confirmed that regular Nx commands still show the error when local Nx
is missing
- Ensured nx-cloud commands can run without local Nx installation
0 commit comments