1

I'm implementing a semantic-release plugin but when I applied it to build, it triggers following error.

I can understand that generated configuration for my plugin (gradle-semantic-release-plugin) is bad, but I cannot find why it happened and how I can fix. I wish I can get help from community.

✖  EPLUGINCONF The `prepare` plugin configuration is invalid.
The prepare plugin configuration (https://github.com/semantic-release/semantic-release/blob/master/docs/usage/plugins.md#prepare-plugin)  must be
a single or an array of plugins definition. A plugin definition is an npm module name, optionnaly wrapped in an array with an object.

Your configuration for the prepare plugin is [ [ { [AsyncFunction: prepare] pluginName: '@semantic-release/changelog' }, {} ], [ { updateVersion:
[AsyncFunction: updateVersion], default: [AsyncFunction: prepare], pluginName: 'gradle-semantic-release-plugin' }, {} ], [ { [AsyncFunction: prepa
re] pluginName: '@semantic-release/git' }, { assets: [Array] } ] ].

{ AggregateError:
    SemanticReleaseError: The `prepare` plugin configuration is invalid.
        at module.exports (/home/kengo/GitHub/gradle-boilerplate/node_modules/semantic-release/lib/get-error.js:6:10)
        at Object.entries.reduce (/home/kengo/GitHub/gradle-boilerplate/node_modules/semantic-release/lib/plugins/index.js:61:23)
        at Array.reduce (<anonymous>)
        at module.exports (/home/kengo/GitHub/gradle-boilerplate/node_modules/semantic-release/lib/plugins/index.js:47:59)
        at module.exports (/home/kengo/GitHub/gradle-boilerplate/node_modules/semantic-release/lib/get-config.js:83:35)
        at <anonymous>
    at module.exports (/home/kengo/GitHub/gradle-boilerplate/node_modules/semantic-release/lib/plugins/index.js:87:11)
    at module.exports (/home/kengo/GitHub/gradle-boilerplate/node_modules/semantic-release/lib/get-config.js:83:35)
    at <anonymous>

My configuration for release is listed in this package.json and there is no configuration for my plugin.

Thanks in advance!

Kengo TODA
  • 426
  • 4
  • 10

1 Answers1

1

I found that it is because I exported multiple functions as prepare. This PR solved my problem.

Kengo TODA
  • 426
  • 4
  • 10
  • I am also facing the same issue but my yaml code is different so want to ask is that feasible what I am doing: "@semantic-release/exec", { "prepareCmd": "./scripts/semantic-release/prepareCmd-loki.sh v${nextRelease.version}", "publishCmd": "./scripts/semantic-release/publishCmd-loki.sh v${nextRelease.version}" }, "@semantic-release/exec", { "prepareCmd": "./scripts/semantic-release/prepareCmd-grafana.sh v${nextRelease.version}", "publishCmd": "./scripts/semantic-release/publishCmd-grafana.sh v${nextRelease.version}" } – Ashish Karpe Sep 03 '21 at 05:08
  • to get a clear idea I have explained my issue here... so any help is appreciated. https://stackoverflow.com/questions/69041181/getting-error-semantic-release-epluginsconf-the-plugins-configuration-i – Ashish Karpe Sep 03 '21 at 07:41