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

The analyzeCommits plugin configuration is invalid. Your configuration for the analyzeCommits plugin is ``. #381

Open
mklueh opened this issue Sep 25, 2022 · 1 comment

Comments

@mklueh
Copy link

mklueh commented Sep 25, 2022

Hello,

I'm trying to get this plugin working, however I'm always running into the error

What I tried so far was the .releaserc.json and package.json config types with both having the same results:

[10:30:43 AM] [semantic-release] › ✖  EPLUGINCONF The `analyzeCommits` plugin configuration is invalid.
The analyzeCommits plugin configuration (https://github.com/semantic-release/semantic-release/blob/master/docs/usage/plugins.md#analyzecommits-plugin) is required and  must be a single or an array of plugins definition. A plugin definition is an npm module name, optionally wrapped in an array with an object.

Your configuration for the analyzeCommits plugin is ``.

AggregateError: 
    SemanticReleaseError: The `analyzeCommits` plugin configuration is invalid.
        at module.exports (/home/user/workspace/my-app/node_modules/semantic-release/lib/get-error.js:6:10)
        at /home/user/workspace/my-app/node_modules/semantic-release/lib/plugins/index.js:62:23
        at Array.reduce (<anonymous>)
        at module.exports (/home/user/workspace/my-app/node_modules/semantic-release/lib/plugins/index.js:47:59)
        at module.exports (/home/user/workspace/my-app/node_modules/semantic-release/lib/get-config.js:84:35)
        at async module.exports (/home/user/workspace/my-app/node_modules/semantic-release/index.js:265:32)
        at async module.exports (/home/user/workspace/my-app/node_modules/semantic-release/cli.js:55:5)
    at module.exports (/home/user/workspace/my-app/node_modules/semantic-release/lib/plugins/index.js:89:11)
    at module.exports (/home/user/workspace/my-app/node_modules/semantic-release/lib/get-config.js:84:35)
    at async module.exports (/home/user/workspace/my-app/node_modules/semantic-release/index.js:265:32)

This is my configuration

"dependencies": {
    "semantic-release": "^19.0.5",
    "conventional-changelog-conventionalcommits": "^5.0.0",
    "@semantic-release/changelog": "^6.0.1",
    "@semantic-release/commit-analyzer": "^9.0.2",
    "@semantic-release/exec": "^6.0.3",
    "@semantic-release/git": "^10.0.1",
    "@semantic-release/github": "^8.0.6",
    "@semantic-release/release-notes-generator": "^10.0.3",
},
"release": {
    "preset": "conventionalcommits",
    "plugins": [
      "@semantic-release/commit-analyzer",
      "@semantic-release/release-notes-generator",
      "@semantic-release/changelog",
      [
        "@semantic-release/exec",
        {
          "publishCmd": "nx run affected --target=release --args=\"--version=${nextRelease.version}\""
        }
      ]
    ]
  },

What am I missing?

@wickedest
Copy link

I had the same issue. I was testing the setup, and the usage seemed to suggest that various stages/plugins could be executed, so I tried:

semantic-release --analyze-commits

And it failed with the same error as you mentioned. I had to debug to discover that there's supposed to be a second argument, which is a string. I found I had to use the analyzer plugin to make it work:

semantic-release --analyze-commits "@semantic-release/commit-analyzer"

I guess that these override the .releaserc.json configuration options. I was trying to do a dry-run of the local commits to see if it would bump as expected (I still haven't figured that out). Maybe that'll help you find the issue.

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

No branches or pull requests

2 participants