Matt Derrick
Matt Derrick

Reputation: 5724

Lerna and changelogPreset for conventional commits failing to load

I'm wanting to change my Lerna change log preset to use conventionalcommits by doing the following in my lerna.json:

// lerna.json
"changelogPreset": {
  "name": "conventionalcommits"
}

yet every time I run npx lerna version --conventional-commits it fails with:

lerna WARN getChangelogConfig require() of ES Module /monorepo/node_modules/conventional-changelog-conventionalcommits/src/index.js from /monorepo/node_modules/lerna/dist/index.js not supported.
lerna WARN getChangelogConfig Instead change the require of /monorepo/node_modules/conventional-changelog-conventionalcommits/src/index.js in /monorepo/node_modules/lerna/dist/index.js to a dynamic import() which is available in all CommonJS modules.
lerna ERR! EPRESET Unable to load conventional-changelog preset 'conventionalcommits' (conventional-changelog-conventionalcommits)

The documentation on the Lerna website is slim at best. How can I change the Lerna changelog format successfully to use this format instead of the Angular one?

Upvotes: 0

Views: 381

Answers (0)

Related Questions