nrwl / nx

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

Nx create-nx-workspace is completely broken on MacOS arm64 Sonoma 14.1 #21232

Open helgardferreira opened 8 months ago

helgardferreira commented 8 months ago

Current Behavior

Currently if I run npx create-nx-workspace with or without a preset, whether the setup is package-based or integrated, etc. The CLI hangs indefinitely on Creating your workspace.

Expected Behavior

The expected behaviour is for the create-nx-workspace to work on any mainstream operating system.

GitHub Repo

No response

Steps to Reproduce

  1. Run npx create-nx-workspace on MacOS aarm64 Sonoma

Nx Report

N/A - I'm not even able to create a workspace.

Please let me know if there's any other way to generate logs for this or if there is a verbose flag.

Failure Logs

No response

Package Manager Version

npm 9.8.0

Operating System

Additional Information

CLI Output:

npx create-nx-workspace

 >  NX   Let's create a new workspace [https://nx.dev/getting-started/intro]

✔ Where would you like to create your workspace? · org
✔ Which stack do you want to use? · none
✔ Package-based monorepo, integrated monorepo, or standalone project? · package-based
✔ Enable distributed caching to make your CI faster · Yes

 >  NX   Creating your v17.2.8 workspace.

   To make sure the command works reliably in all environments, and that the preset is applied correctly,
   Nx will run "npm install" several times. Please wait.

✔ Installing dependencies with npm
⠧ Creating your workspace in org
helgardferreira commented 8 months ago

If I downgrade to v15.9.2 then I am able to create a nx workspace. The @latest, @previous, and @canary versions are all not functioning.

helgardferreira commented 8 months ago

Update: after successfully running npx create-nx-workspace@15.9.2 I noticed the CLI mentioned the following: Directory is already under version control. Skipping initialization of git.

Context: I have git setup for neovim and tmux that rests at ~/ that ignores (via .gitignore) everything except for my neovim and tmux configuration.

After some experimenting I was able to get npx create-nx-workspace@latest to work if I create a folder (in my intended directory) and first git init before running nps create-nx-workspace@latest.

My theory is there is something wrong with the CLI's logic when certain commands are executed within a directory that is nested within a git repo with certain .gitignore rules.

Markus-Ende commented 2 weeks ago

same as this issue https://github.com/nrwl/nx/issues/20270