nrwl / nx

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

Nx failed to create new workspace #27270

Open JCEdward opened 1 month ago

JCEdward commented 1 month ago

Current Behavior

Create work space with yarn npx create-nx-workspace test-nx-expo --pm yarn

yarn create nx-workspace --verbose
➤ YN0000: · Yarn 4.3.1
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + create-nx-workspace@npm:19.5.6, ansi-colors@npm:4.1.3, ansi-regex@npm:5.0.1, ansi-styles@npm:4.3.0, asynckit@npm:0.4.0, axios@npm:1.7.3, base64-js@npm:1.5.1, bl@npm:4.1.0, and 48 more.
➤ YN0000: └ Completed in 0s 466ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ 56 packages were added to the project (+ 4.07 MiB).
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0000: └ Completed in 0s 470ms
➤ YN0000: · Done with warnings in 1s 32ms

 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? · angular
√ Integrated monorepo, or standalone project? · integrated
√ Application name · org
√ Which bundler would you like to use? · esbuild
√ Default stylesheet format · scss
√ Do you want to enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering)? · No
√ Test runner to use for end to end (E2E) tests · playwright
√ Which CI provider would you like to use? · github

 NX   Creating your v19.5.6 workspace.

✔ Installing dependencies with yarn
✖ Creating your workspace in org

 NX   Failed to create a workspace.

Exit code: 1
Log file: C:\Users\chien\AppData\Local\Temp\tmp-8876-UP6RO6Te6NWk\error.log

Expected Behavior

I should be creating an Nx workspace successfully.

GitHub Repo

No response

Steps to Reproduce

run yarn create nx-workspace --verbose

Nx Report

I cant create proj to run nx report

Failure Logs

NX   spawnSync C:\Windows\system32\cmd.exe ENOENT

Error: spawnSync C:\Windows\system32\cmd.exe ENOENT
    at Object.spawnSync (node:internal/child_process:1124:20)
    at spawnSync (node:child_process:876:24)
    at execSync (node:child_process:957:15)
    at C:\Users\chien\AppData\Local\Temp\tmp-2876-OdDrTz3Lo5Ax\node_modules\@nx\workspace\src\generators\new\new.js:19:46
    at C:\Users\chien\AppData\Local\Temp\tmp-2876-OdDrTz3Lo5Ax\node_modules\nx\src\command-line\new\new.js:26:19
    at async handleErrors (C:\Users\chien\AppData\Local\Temp\tmp-2876-OdDrTz3Lo5Ax\node_modules\nx\src\utils\params.js:22:24)
    at async Object.handler (C:\Users\chien\AppData\Local\Temp\tmp-2876-OdDrTz3Lo5Ax\node_modules\nx\src\command-line\new\command-object.js:10:22)

Package Manager Version

yarn 4.3.1

Operating System

Additional Information

NX spawnSync C:\Windows\system32\cmd.exe ENOENT

Error: spawnSync C:\Windows\system32\cmd.exe ENOENT at Object.spawnSync (node:internal/child_process:1124:20) at spawnSync (node:child_process:876:24) at execSync (node:child_process:957:15) at C:\Users\chien\AppData\Local\Temp\tmp-8876-UP6RO6Te6NWk\node_modules\@nx\workspace\src\generators\new\new.js:19:46 at C:\Users\chien\AppData\Local\Temp\tmp-8876-UP6RO6Te6NWk\node_modules\nx\src\command-line\new\new.js:26:19 at async handleErrors (C:\Users\chien\AppData\Local\Temp\tmp-8876-UP6RO6Te6NWk\node_modules\nx\src\utils\params.js:22:24) at async Object.handler (C:\Users\chien\AppData\Local\Temp\tmp-8876-UP6RO6Te6NWk\node_modules\nx\src\command-line\new\command-object.js:10:22)

maxisam commented 1 month ago

Same here. if you switch to npm, it should work.

JCEdward commented 1 month ago

Same here. if you switch to npm, it should work.

yes. i tried npm and it works fine, also i tried yarn on ubuntu. everything works fine

maxisam commented 1 month ago

I don't know what it is, but one of our teammate make it work. This is kinda weird.

AlanGRutter commented 1 month ago

Trying to create NX workspace v19.5.7 on Ubuntu from within VSCode Powershell terminal.

Command: npx create-nx-workspace --pm pnpm --verbose Options: Angular Integrated webpack scss SSR - yes playwright skip skip

Successfully completes 'Installed dependencies with pnpm' then fails creating workspace. No error displayed even using --verbose

When run in a normal Ubuntu terminal window - works fine.

maxisam commented 1 month ago

we used Windows

santoshyadavdev commented 4 weeks ago

I am experiencing something similar with Mac

Screenshot 2024-08-18 at 22 24 28