Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npx create-nx-workspace --pm yarn fails on Windows 11 Home 23H2 #22917

Closed
1 of 4 tasks
Ankish76 opened this issue Apr 19, 2024 · 4 comments · Fixed by #29122
Closed
1 of 4 tasks

npx create-nx-workspace --pm yarn fails on Windows 11 Home 23H2 #22917

Ankish76 opened this issue Apr 19, 2024 · 4 comments · Fixed by #29122
Assignees
Labels

Comments

@Ankish76
Copy link

Current Behavior

When running npx create-nx-workspace --pm yarn it fails
but when using npm or pnpm its working fine
also it is working fine in WSL

Expected Behavior

It should work when package manger is yarn

GitHub Repo

No response

Steps to Reproduce

  1. run npx create-nx-workspace@latest --pm yarn on windows 11 with node lts v20.12.2 or v18.18.0 or v20.10.0

Nx Report

Not able to run

Failure Logs

PS D:\Projects\Ankish> npx create-nx-workspace@latest --pm yarn

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

√ Where would you like to create your workspace? · psi
√ Which stack do you want to use? · react
√ What framework would you like to use? · nextjs
√ Integrated monorepo, or standalone project? · integrated
√ Would you like to use the App Router (recommended)? · Yes
√ Would you like to use the src/ directory? · Yes
√ Test runner to use for end to end (E2E) tests · cypress
√ Default stylesheet format · tailwind
√ Do you want Nx Cloud to make your CI fast? · github

 NX   Creating your v18.3.2 workspace.

✔ Installing dependencies with yarn
✖ Creating your workspace in psi

 NX   Failed to create a workspace.

Error: error Command failed with exit code 1.

Package Manager Version

yarn 1.22.19

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@ntrannghia
Copy link

same error on window 10 22h2
node version
21.7.1
20.15.1
19.5.0
18.20.1
18.18.0

@xiongemi
Copy link
Collaborator

@ntrannghia i tried on windows. i coud not replicate this issue with node version 20.11.1, windows 10, yarn version 1.22.2, nx version 19.6.1.
could you try the command with --verbose and see if there are any logs? also maybe try to skip the CI provider

✔ Which CI provider would you like to use? · skip
✔ Would you like remote caching to make your build faster? · skip

@kclay
Copy link

kclay commented Sep 9, 2024

@ntrannghia i tried on windows. i coud not replicate this issue with node version 20.11.1, windows 10, yarn version 1.22.2, nx version 19.6.1. could you try the command with --verbose and see if there are any logs? also maybe try to skip the CI provider

✔ Which CI provider would you like to use? · skip
✔ Would you like remote caching to make your build faster? · skip

Running into the same issue on windows 10. Wasn't like this before.
node = 20.11.1
yarn 1.22.19

λ cross-env NX_VERBOSE_LOGGING=true npx create-nx-workspace@latest --pm yarn --verbose

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

√ Where would you like to create your workspace? · test3
√ Which stack do you want to use? · none
√ Package-based monorepo, integrated monorepo, or standalone project? · integrated
√ Which CI provider would you like to use? · skip
√ Would you like remote caching to make your build faster? · skip

 NX   Creating your v19.6.6 workspace.

√ Installing dependencies with yarn
× Creating your workspace in test3

 NX   Failed to create a workspace.

Error: error Command failed with exit code 1.

Stack: CreateNxWorkspaceError: error Command failed with exit code 1.

    at C:\Users\xxxx\AppData\Local\npm-cache\_npx\505743838affa773\node_modules\create-nx-workspace\src\utils\child-process-utils.js:38:21
    at ChildProcess.exithandler (node:child_process:430:5)
    at ChildProcess.emit (node:events:514:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)

@ndcunningham
Copy link
Contributor

I tried to reproduce it on my windows machine but it is working as expected.
Here is a log of the build https://cloud.nx.app/runs/v1evoFkUwN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants