Skip to content

fix(core): use fork to execute nx generate workspace:preset#29122

Merged
FrozenPandaz merged 3 commits intomasterfrom
core/create-nx-workspace-fork-nx
Dec 3, 2024
Merged

fix(core): use fork to execute nx generate workspace:preset#29122
FrozenPandaz merged 3 commits intomasterfrom
core/create-nx-workspace-fork-nx

Conversation

@Coly010
Copy link
Copy Markdown
Contributor

@Coly010 Coly010 commented Nov 29, 2024

Current Behavior

On Windows, when packageManager=pnpm, create-nx-workspace fails due to an issue with child_process.spawn.
Using spawn, the @nx/workspace:preset generator is executed twice when packageManager=pnpm, causing the overall create-nx-workspace flow to fail, even though most things have been set up correctly to that point.

Using fork has shown success.

Expected Behavior

Running create-nx-workspace --packageManager=pnpm should work on Windows

Fixes

Fixes #20222
Fixes #27270
Fixes #22917
Fixes #22312
Fixes #28710
Fixes #28289
Fixes #28235
Fixes #22383
Fixes #21742
Fixes #20270

@Coly010 Coly010 requested a review from a team as a code owner November 29, 2024 17:03
@Coly010 Coly010 requested a review from AgentEnder November 29, 2024 17:04
@Coly010 Coly010 self-assigned this Nov 29, 2024
@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 29, 2024

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 Dec 3, 2024 10:13am

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented Nov 29, 2024

@github-actions
Copy link
Copy Markdown
Contributor

🐳 We have a release for that!

This PR has a release associated with it. You can try it out using this command:

npx create-nx-workspace@0.0.0-pr-29122-4727ac1 my-workspace

Or just copy this version and use it in your own command:

0.0.0-pr-29122-4727ac1
Release details 📑
Published version 0.0.0-pr-29122-4727ac1
Triggered by @Coly010
Branch core/create-nx-workspace-fork-nx
Commit 4727ac1
Workflow run 12089620090

To request a new release for this pull request, mention someone from the Nx team or the @nrwl/nx-pipelines-reviewers.

@Coly010 Coly010 force-pushed the core/create-nx-workspace-fork-nx branch from 4727ac1 to ef6a0e4 Compare December 2, 2024 11:37
Comment thread packages/workspace/src/generators/new/generate-preset.ts
Comment thread packages/workspace/src/generators/new/generate-preset.ts Outdated
@Coly010 Coly010 requested a review from FrozenPandaz December 3, 2024 10:11
@FrozenPandaz FrozenPandaz merged commit 54dbbfd into master Dec 3, 2024
@FrozenPandaz FrozenPandaz deleted the core/create-nx-workspace-fork-nx branch December 3, 2024 20:17
@github-actions
Copy link
Copy Markdown
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 Dec 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.