jscutlery / semver

Nx plugin to automate semantic versioning and CHANGELOG generation.
MIT License
727 stars 84 forks source link

All projects are failing with unspecific error message #747

Closed mklueh closed 9 months ago

mklueh commented 10 months ago

Hi there,

after a while I was trying to deploy my application from an Nx monorepo again, but it fails with an unspecific error:

[my-application] 🟠 No previous version tag found, fallback to version 0.0.0.
        New version will be calculated based on all changes since first commit.
        If your project is already versioned, please tag the latest release commit with $my-application-x.y.z and run this command again.
[my-application] 🆕 Calculated new version "0.0.1-beta.0".
[my-application] 📝 Updated package.json version.
[my-application] ❌ Error
    at /home/runner/work/my-project/my-project/node_modules/@jscutlery/semver/src/executors/common/exec.js:10:34
    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)

These are the versions I am using

   Node   : 20.7.0
   OS     : win32-x64
   yarn   : 4.0.1

   nx                 : 17.1.1
   @nx/js             : 17.1.1
   @nx/jest           : 17.1.1
   @nx/linter         : 17.1.1
   @nx/eslint         : 17.1.1
   @nx/workspace      : 17.1.1
   @nx/angular        : 17.1.1
   @nx/cypress        : 17.1.1
   @nx/devkit         : 17.1.1
   @nx/eslint-plugin  : 17.1.1
   @nx/react          : 17.1.1
   @nx/storybook      : 17.1.1
   @nrwl/tao          : 15.9.7
   @nx/vite           : 17.1.1
   @nx/web            : 17.1.1
   @nx/webpack        : 17.1.1
   typescript         : 5.2.2
   ---------------------------------------
   Community plugins:
   @jnxplus/nx-gradle                  : 0.17.0
   @jscutlery/semver                   : 4.0.0
   @nxext/vite                         : 15.1.0
   @nxkit/playwright                   : 3.0.2
   @nxkit/style-dictionary             : 3.0.2
   @nxtend/firebase                    : 12.1.0
   @theunderscorer/nx-semantic-release : 2.7.1
   @trumbitta/nx-plugin-openapi        : 1.12.1
   @trumbitta/nx-plugin-unused-deps    : 1.12.1
   ---------------------------------------
   The following packages should match the installed version of nx
     - @nrwl/tao@15.9.7

   To fix this, run `nx migrate nx@17.1.1`

and this is the project.json of one of the failing applications

{
  "name": "my-application",
  "$schema": "../../node_modules/nx/schemas/project-schema.json",
  "projectType": "application",
  "targets": {
    "version": {
      "executor": "@jscutlery/semver:version",
      "options": {
        "push": true,
        "baseBranch": "master",
        "preset": "conventional",
        "tagPrefix": "${projectName}-"
      }
    },

It worked a while ago and I have not changed anything except for upgrading dependencies once in a while.

Two odd things:

1. The tags are still getting pushed successfully into the repository.

2. With the dryRun option the failure disappears

Is there any chance to see the actual error, like a verbose option?

drixsonic commented 10 months ago

Did you find a solution for this? It seems that we are running into the same problem.

mklueh commented 10 months ago

@drixsonic Hi.

No sadly not.

Do you have a different configuration than me?

edbzn commented 9 months ago

I think it's related to a conflict with commitlint dependencies cf: https://github.com/jscutlery/semver/issues/743#issuecomment-1855693458. Updating commitlint and semver should fix your issue.

mklueh commented 9 months ago

I'm not sure what I did besides upgrading deps, but the issue disappeared some days ago

edbzn commented 9 months ago

I'm going to close, feel free to reopen if still encountered.