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

Release group "__default__" matches no projects. Please ensure all release groups match at least one project #29723

Closed
4 tasks
marc-wilson opened this issue Jan 22, 2025 · 5 comments · Fixed by #29775

Comments

@marc-wilson
Copy link

Current Behavior

I am trying to create a publishable package. When i run nx release publish, i get this:

Release group "default" matches no projects. Please ensure all release groups match at least one project

Expected Behavior

the command should work or have documentation around what a release group is and how to set it up.

GitHub Repo

No response

Steps to Reproduce

  1. create a lib (ie: nx g lib libs/package/name --publishable --importPath @org/package/name)
  2. run nx release publish --first-release
  3. run nx release publish again
  4. observe error

Nx Report

NX   Report complete - copy this into the issue template

Node           : 20.17.0
OS             : darwin-arm64
Native Target  : aarch64-macos
npm            : 10.8.2

nx                     : 20.3.1
@nx/js                 : 20.3.1
@nx/jest               : 20.3.1
@nx/eslint             : 20.3.1
@nx/workspace          : 20.3.1
@nx/angular            : 20.3.1
@nx/cypress            : 20.3.1
@nx/devkit             : 20.3.1
@nx/esbuild            : 20.3.1
@nx/eslint-plugin      : 20.3.1
@nx/module-federation  : 20.3.1
@nx/nest               : 20.3.1
@nx/node               : 20.3.1
@nx/vite               : 20.3.1
@nx/web                : 20.3.1
@nx/webpack            : 20.3.1
typescript             : 5.6.3
---------------------------------------
Community plugins:
@auth0/auth0-angular  : 2.2.3
@ngrx/component-store : 19.0.0
@ngrx/operators       : 19.0.0
apollo-angular        : 8.0.0

Failure Logs

There are no logs. Only the error. There is zero documentation around about release groups. there is a single mentioing of it in the publishable docs but no real description or information around what it is/how they work/how to configure.

https://nx.dev/recipes/nx-release/get-started-with-nx-release#customize-the-commit-message-and-tag-pattern

"When using release groups in which the member projects are versioned together, you can also leverage {releaseGroupName} and it will be interpolated appropriately in the commit/tag that gets created for that release group."

Package Manager Version

No response

Operating System

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

Additional Information

No response

@marc-wilson
Copy link
Author

Related: #20383

@marc-wilson
Copy link
Author

It looks like when you generate a new lib with --publishable, a new package is installed (verdaccio) and a new project.json file is created. I assume verdaccio is a third party packaging system but it's not clear what the project.json file is. It almost looks like it's the same as the regulat project.json that's generated with every app, but instead it's put at the repository root?

@origranot
Copy link
Contributor

origranot commented Jan 27, 2025

Hey, can you share your nx.json?

@xiongemi
Copy link
Collaborator

could you try to add "fallbackCurrentVersionResolver": "disk" to your release.version.generatorOptions?

in project.json, add to release like:

  "release": {
    "version": {
      "generatorOptions": {
        "packageRoot": "dist/{projectRoot}",
        "currentVersionResolver": "git-tag",
        "fallbackCurrentVersionResolver": "disk"
      }
    }
  }

or in nx.json:

  "release": {
    "version": {
      "preVersionCommand": "npx nx run-many -t build",
      "generatorOptions": {
        "fallbackCurrentVersionResolver": "disk"
      }
    }
  },
``

xiongemi added a commit that referenced this issue Feb 10, 2025
<!-- 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` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->
- there is no option `fallbackCurrentVersionResolver: 'disk',`
- can't run release for newly created publishable libraries

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
- move code to add release for publishable libraries into its own file
to be reused by other stacks
- add `fallbackCurrentVersionResolver: 'disk',` to project's
release.version. generatorOptions

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

Fixes #29723
jaysoo pushed a commit that referenced this issue Feb 12, 2025
<!-- 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` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->
- there is no option `fallbackCurrentVersionResolver: 'disk',`
- can't run release for newly created publishable libraries

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
- move code to add release for publishable libraries into its own file
to be reused by other stacks
- add `fallbackCurrentVersionResolver: 'disk',` to project's
release.version. generatorOptions

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

Fixes #29723
@marc-wilson
Copy link
Author

@xiongemi I do not have a release property in either nx or project.json. which one should it go in? i only have one single lib i want to publish in my repo.

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.

4 participants