Skip to content

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented May 16, 2025

This PR fixes an issue with the global nx command, where running nx init in a non-JS folder (i.e. using dot-nx setup) results in a workspace that doesn't work with the global command.

e.g.

brew install nx
cd some-java-project
nx init
nx report

https://www.loom.com/share/e8dbb2fb7a084300a4dd1e5dff2c0db1

Current Behavior

nx report or any other command fails

Expected Behavior

nx commands should work

Related Issue(s)

Fixes #

@jaysoo jaysoo requested a review from a team as a code owner May 16, 2025 13:45
@jaysoo jaysoo requested a review from leosvelperez May 16, 2025 13:45
Copy link

vercel bot commented May 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview May 16, 2025 1:46pm

Copy link
Contributor

nx-cloud bot commented May 16, 2025

View your CI Pipeline Execution ↗ for commit 2193af4.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 37m 29s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 18s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 3s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 2s View ↗
nx documentation ✅ Succeeded 2m 2s View ↗

☁️ Nx Cloud last updated this comment at 2025-05-16 14:29:50 UTC

@jaysoo jaysoo merged commit 840f5f4 into master May 16, 2025
6 checks passed
@jaysoo jaysoo deleted the fix/global-dot-nx branch May 16, 2025 14:57
FrozenPandaz pushed a commit that referenced this pull request May 16, 2025
…it (#31249)

This PR fixes an issue with the global `nx` command, where running `nx
init` in a non-JS folder (i.e. using dot-nx setup) results in a
workspace that doesn't work with the global command.

e.g.

```
brew install nx
cd some-java-project
nx init
nx report
```

https://www.loom.com/share/e8dbb2fb7a084300a4dd1e5dff2c0db1

## Current Behavior
`nx report` or any other command fails

## Expected Behavior
`nx` commands should work

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #

(cherry picked from commit 840f5f4)
FrozenPandaz pushed a commit that referenced this pull request May 16, 2025
…it (#31249)

This PR fixes an issue with the global `nx` command, where running `nx
init` in a non-JS folder (i.e. using dot-nx setup) results in a
workspace that doesn't work with the global command.

e.g.

```
brew install nx
cd some-java-project
nx init
nx report
```

https://www.loom.com/share/e8dbb2fb7a084300a4dd1e5dff2c0db1

## Current Behavior
`nx report` or any other command fails

## Expected Behavior
`nx` commands should work

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #

(cherry picked from commit 840f5f4)
@gioragutt
Copy link
Contributor

@jaysoo random question 😅 why does your change fix this? Does running the local version of NX like this perform some side-effect that then makes the global version work properly?

Copy link
Contributor

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants