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

create-nx-workspace strips version from preset option #23174

Closed
1 of 4 tasks
zachlewton opened this issue May 3, 2024 · 2 comments · Fixed by #23284
Closed
1 of 4 tasks

create-nx-workspace strips version from preset option #23174

zachlewton opened this issue May 3, 2024 · 2 comments · Fixed by #23284

Comments

@zachlewton
Copy link

Current Behavior

right now npx create-nx-workspace my-workspace --preset=@org/package@1.1.1 does not respect the version and defaults to latest

Expected Behavior

this command would respect the version passed to it

GitHub Repo

No response

Steps to Reproduce

This is just an example that mirrors my situation:
(have go installed locally)

  1. run npx create-nx-workspace go-workspace --preset=@nx-go/nx-go@2.7.0
  2. cd go-workspace
  3. run nx report

you will see it installed the latest nx-go rather than the version you specified
https://github.com/nx-go/nx-go/releases

Nx Report

Node   : 18.18.2
OS     : darwin-arm64
npm    : 9.8.1

nx             : 18.3.4
@nx/workspace  : 18.3.4
@nx/devkit     : 18.3.4
@nrwl/tao      : 18.3.4
---------------------------------------
Registered Plugins:
@nx-go/nx-go
---------------------------------------
Community plugins:
@nx-go/nx-go : 3.0.0

Failure Logs

No response

Package Manager Version

No response

Operating System

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

Additional Information

No response

@xiongemi
Copy link
Collaborator

xiongemi commented May 9, 2024

i submit a pr #23174 to install the specified version for 3rd party preset. however, for @nx-go/nx-go@2.7.0, it does not have preset generator for this version.
i got an error:

 NX   Failed to apply preset: @nx-go/nx-go

when I try to run the command.
i think the preset generator for @nx-go/nx-go is added for 3.0.0

@zachlewton
Copy link
Author

yeah sorry i was just using that as an example but probably should have picked one with valid generator . didnt realize that was the case , my bad!

FrozenPandaz pushed a commit that referenced this issue May 27, 2024
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

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

Fixes #23174
ndcunningham pushed a commit that referenced this issue May 28, 2024
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

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

Fixes #23174
FrozenPandaz pushed a commit that referenced this issue May 28, 2024
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

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

Fixes #23174

(cherry picked from commit c9f3c05)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants