release-notes-generator
release-notes-generator copied to clipboard
`MODULE_NOT_FOUND` when running with `npx`
I have a github action which executes semantic-release
with npx
. The project does not have a package.json
.
Everything seems to work fine, before failing with error Cannot find module 'conventional-changelog-conventionalcommits'
.releaserc.yml
branches:
- main
- name: beta
prerelease: beta
debug: true
plugins:
- "@semantic-release/commit-analyzer"
- path: "@semantic-release/release-notes-generator"
preset: conventionalcommits
- "@semantic-release/github"
workflow.yml
on:
workflow_dispatch:
jobs:
release:
name: Release
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_VERSION: "20.x"
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Run `semantic-release`
run: |
npx --yes semantic-release --dry-run
logs
Run npx --yes semantic-release --dry-run
npx --yes semantic-release --dry-run
shell: /usr/bin/bash -e {0}
env:
NODE_VERSION: 20.x
GH_TOKEN: ***
npm WARN deprecated [email protected]: Renamed to read-package-up
[12:48:09 AM] [semantic-release] › ℹ Running semantic-release version 22.0.8
[12:48:09 AM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/github"
[12:48:09 AM] [semantic-release] › ✔ Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[12:48:09 AM] [semantic-release] › ✔ Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[12:48:09 AM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/github"
[12:48:09 AM] [semantic-release] › ✔ Loaded plugin "addChannel" from "@semantic-release/github"
[12:48:09 AM] [semantic-release] › ✔ Loaded plugin "success" from "@semantic-release/github"
[12:48:09 AM] [semantic-release] › ✔ Loaded plugin "fail" from "@semantic-release/github"
[...]
[12:48:12 AM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[12:48:12 AM] [semantic-release] › ℹ There is no previous release, the next release version is 1.0.0-stage.1
[12:48:12 AM] [semantic-release] › ℹ Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[12:48:12 AM] [semantic-release] › ✘ Failed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[12:48:12 AM] [semantic-release] › ✘ An error occurred while running semantic-release: Error: Cannot find module 'conventional-changelog-conventionalcommits'
at importFrom (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/import-from-esm/index.js:100:17)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async default (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/@semantic-release/release-notes-generator/lib/load-changelog-config.js:27:63)
at async generateNotes (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/@semantic-release/release-notes-generator/index.js:34:38)
at async validator (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/lib/plugins/normalize.js:36:24)
at async file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/lib/plugins/pipeline.js:38:36
at async file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/lib/plugins/pipeline.js:32:5
at async pluginsConfigAccumulator.<computed> [as generateNotes] (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/lib/plugins/index.js:87:11)
at async run (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/index.js:197:23)
at async Module.default (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/index.js:275:22) {
code: 'MODULE_NOT_FOUND',
pluginName: '@semantic-release/release-notes-generator'
}
Error: Cannot find module 'conventional-changelog-conventionalcommits'
at importFrom (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/import-from-esm/index.js:100:17)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async default (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/@semantic-release/release-notes-generator/lib/load-changelog-config.js:27:63)
at async generateNotes (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/@semantic-release/release-notes-generator/index.js:34:38)
at async validator (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/lib/plugins/normalize.js:36:24)
at async file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/lib/plugins/pipeline.js:38:36
at async file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/lib/plugins/pipeline.js:32:5
at async pluginsConfigAccumulator.<computed> [as generateNotes] (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/lib/plugins/index.js:87:11)
at async run (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/index.js:197:23)
at async Module.default (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/index.js:275:22) {
code: 'MODULE_NOT_FOUND',
pluginName: '@semantic-release/release-notes-generator'
}
Error: Process completed with exit code 1.
The preset you've chosen to use is not a dependency of semantic-release, so you need to install it in addition to semantic-release. You can still do this directly in your workflow without a package.json
@travi I have conventional-changelog-conventionalcommits
installed and I still have the problem.
[4:05:29 PM] [semantic-release] › ℹ Running semantic-release version 21.0.2
(node:387) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
[4:05:30 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/changelog"
[4:05:30 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/git"
[4:05:30 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/gitlab"
[4:05:30 PM] [semantic-release] › ✔ Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[4:05:30 PM] [semantic-release] › ✔ Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[4:05:30 PM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/changelog"
[4:05:30 PM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/git"
[4:05:30 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/gitlab"
[4:05:30 PM] [semantic-release] › ✔ Loaded plugin "success" from "@semantic-release/gitlab"
[4:05:30 PM] [semantic-release] › ✔ Loaded plugin "fail" from "@semantic-release/gitlab"
[4:05:31 PM] [semantic-release] › ✔ Run automated release from branch main on repository https://gitlab-ci-token:[secure]@git.aerys.in/aerys/infrastructure/vendor/semantic-release-docker.git
[4:05:32 PM] [semantic-release] › ✔ Allowed to push to the Git repository
[4:05:32 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/changelog"
[4:05:32 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/changelog"
[4:05:32 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/git"
[4:05:32 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/git"
[4:05:32 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/gitlab"
[4:05:32 PM] [semantic-release] [@semantic-release/gitlab] › ℹ Verify GitLab authentication (https://git.aerys.in/api/v4)
[4:05:32 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/gitlab"
[4:05:32 PM] [semantic-release] › ℹ Found git tag v1.3.1 associated with version 1.3.1 on branch main
[4:05:32 PM] [semantic-release] › ℹ Found 3 commits since last release
[4:05:32 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[4:05:32 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: ci: temporary inhibit the semantic-release before_script install
[4:05:32 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[4:05:32 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore(deps): update node.js to v20
[4:05:32 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is patch
[4:05:32 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: ci: use the conventionalcommits for the release notes
[4:05:32 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[4:05:32 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analysis of 3 commits complete: patch release
[4:05:32 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[4:05:32 PM] [semantic-release] › ℹ The next release version is 1.3.2
[4:05:32 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[4:05:32 PM] [semantic-release] › ✘ Failed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[4:05:32 PM] [semantic-release] › ✘ An error occurred while running semantic-release: Error: Cannot find module 'conventional-changelog-conventionalcommits'
Require stack:
- /builds/aerys/infrastructure/vendor/semantic-release-docker/noop.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15)
at Module._load (node:internal/modules/cjs/loader:975:27)
at Module.require (node:internal/modules/cjs/loader:1225:19)
at require (node:internal/modules/helpers:177:18)
at module.exports (/builds/aerys/infrastructure/vendor/semantic-release-docker/.npm/lib/node_modules/semantic-release/node_modules/import-from/index.js:5:100)
at default (file:///builds/aerys/infrastructure/vendor/semantic-release-docker/.npm/lib/node_modules/semantic-release/node_modules/@semantic-release/release-notes-generator/lib/load-changelog-config.js:28:67)
at generateNotes (file:///builds/aerys/infrastructure/vendor/semantic-release-docker/.npm/lib/node_modules/semantic-release/node_modules/@semantic-release/release-notes-generator/index.js:34:44)
at validator (file:///builds/aerys/infrastructure/vendor/semantic-release-docker/.npm/lib/node_modules/semantic-release/lib/plugins/normalize.js:36:30)
at file:///builds/aerys/infrastructure/vendor/semantic-release-docker/.npm/lib/node_modules/semantic-release/lib/plugins/pipeline.js:38:42
at next (file:///builds/aerys/infrastructure/vendor/semantic-release-docker/.npm/lib/node_modules/semantic-release/node_modules/p-reduce/index.js:16:10) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/builds/aerys/infrastructure/vendor/semantic-release-docker/noop.js'
],
pluginName: '@semantic-release/release-notes-generator'
}
Error: Cannot find module 'conventional-changelog-conventionalcommits'
Require stack:
- /builds/aerys/infrastructure/vendor/semantic-release-docker/noop.js
[90m at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15)[39m
[90m at Module._load (node:internal/modules/cjs/loader:975:27)[39m
[90m at Module.require (node:internal/modules/cjs/loader:1225:19)[39m
[90m at require (node:internal/modules/helpers:177:18)[39m
at module.exports [90m(/builds/aerys/infrastructure/vendor/semantic-release-docker/[39m.npm/lib/node_modules/[4msemantic-release[24m/node_modules/[4mimport-from[24m/index.js:5:100[90m)[39m
at default [90m(file:///builds/aerys/infrastructure/vendor/semantic-release-docker/[39m.npm/lib/node_modules/[4msemantic-release[24m/node_modules/[4m@semantic-release[24m/release-notes-generator/lib/load-changelog-config.js:28:67[90m)[39m
at generateNotes [90m(file:///builds/aerys/infrastructure/vendor/semantic-release-docker/[39m.npm/lib/node_modules/[4msemantic-release[24m/node_modules/[4m@semantic-release[24m/release-notes-generator/index.js:34:44[90m)[39m
at validator [90m(file:///builds/aerys/infrastructure/vendor/semantic-release-docker/[39m.npm/lib/node_modules/[4msemantic-release[24m/lib/plugins/normalize.js:36:30[90m)[39m
at [90mfile:///builds/aerys/infrastructure/vendor/semantic-release-docker/[39m.npm/lib/node_modules/[4msemantic-release[24m/lib/plugins/pipeline.js:38:42
at next [90m(file:///builds/aerys/infrastructure/vendor/semantic-release-docker/[39m.npm/lib/node_modules/[4msemantic-release[24m/node_modules/[4mp-reduce[24m/index.js:16:10[90m)[39m {
code: [32m'MODULE_NOT_FOUND'[39m,
requireStack: [
[32m'/builds/aerys/infrastructure/vendor/semantic-release-docker/noop.js'[39m
],
pluginName: [32m'@semantic-release/release-notes-generator'[39m
}
I am not even using npx
. Just a global install:
FROM registry.aerys.in/aerys/infrastructure/vendor/rust-docker/x86_64-unknown-linux-musl:1.74.0-0 as rust
FROM node:20.11.1
COPY --from=rust /opt/rust /opt/rust
ENV PATH="$PATH:/opt/rust/cargo/bin"
ENV RUSTUP_HOME=/opt/rust/rustup
# To see why we need to execute `semantic-release-cargo` through `@semantic-release/exec`
# see https://git.aerys.in/aerys/smartshape/smartshape-cli/-/issues/569#note_437864.
# To see why we can't execute the Node.js plugin directly and install the binary,
# see https://git.aerys.in/aerys/test/semantic-release-cargo-test/-/issues/2#note_437918.
#
# renovate: datasource=crate depName=semantic-release-cargo
RUN cargo install [email protected]
RUN npm install --global \
# renovate: datasource=npm depName=semantic-release
[email protected] \
# renovate: datasource=npm depName=@semantic-release/gitlab
@semantic-release/[email protected] \
# renovate: datasource=npm depName=@semantic-release/exec
@semantic-release/[email protected] \
# renovate: datasource=npm depName=@semantic-release/commit-analyzer
@semantic-release/[email protected] \
# renovate: datasource=npm depName=@semantic-release/changelog
@semantic-release/[email protected] \
# renovate: datasource=npm depName=@semantic-release/git
@semantic-release/[email protected] \
# renovate: datasource=npm depName=conventional-changelog-conventionalcommits
[email protected]
# Pin the version of `yarn` to avoid mismatching versions in different projects.
RUN corepack prepare [email protected] && \
yarn set version 3.5.0
Running semantic-release version 21.0.2
you are using an old version of semantic-release with the latest version of the conventional-changelog-conventionalcommmits preset. there is a known incompatibility with the latest presets that was fixed in v22 of semantic-release. please upgrade to the latest semantic-release to see if that improves your situation.
That is correct. Somehow I got two versions of release-notes-generator installed. And I ran the wrong/old one.
This is indeed fixed when using the latest version of all packages.
Hi! I'm experiencing a similar issue. Let me know if you want me opening a new issue, but I think both are linked.
I use the latest version of all packages (expect @semantic-release/commit-analyzer
, I'll explain that later).
I use Yarn 4, with the Plug'n'Play feature (so there are no node_modules).
- semantic-release 24.0.0
- conventional-changelog-conventionalcommits 8.0.0
- @semantic-release/release-notes-generator 14.0.0
workflow
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Enable Corepack
run: corepack enable
# workaround as setup/node doesn't do it before using yarn
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: 'https://npm.pkg.github.com'
scope: '@opalenet'
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
- name: Install local dependencies (yarn)
run: yarn install --immutable
- name: Get release tool configuration
uses: OpaleNet/workflows@main
id: release-configuration
with:
npm-release: true
- name: Setup configuration
run: echo '${{ env.CONFIGURATION }}' > .releaserc
env:
CONFIGURATION: ${{ steps.release-configuration.outputs.configuration }}
- name: debug
run: yarn info -R
- name: Publish
id: release
run: yarn run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
semantic-release config (provided by my custom action OpaleNet/workflows)
const config = {
"branches": ["+([0-9])?(.{+([0-9]),x}).x","main","master"],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "angular",
"parserOpts": {
"breakingHeaderPattern": "^(\\w*)(?:\\((.*)\\))?!: (.*)$",
"headerPattern": "^(\\w*)(?:\\((.*)\\))?!?: (.*)$"
},
"releaseRules": [
{"breaking": true, "release": "major"},
{"type": "feat", "release": "minor"},
{"type": "feature", "release": "minor"},
{"type": "fix", "release": "patch"},
{"type": "build", "release": "patch"},
{"type": "docs", "release": "patch"},
{"type": "doc", "release": "patch"},
{"type": "style", "release": "patch"},
{"type": "refactor", "release": "patch"},
{"type": "refact", "release": "patch"},
{"type": "imp", "release": "patch"},
{"type": "improve", "release": "patch"},
{"type": "perf", "release": "patch"},
{"type": "test", "release": "patch"},
{"type": "ci", "release": "patch"}
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{"type": "feat", "section": "Features"},
{"type": "feature", "section": "Features"},
{"type": "fix", "section": "Bug Fixes"},
{"type": "build", "section": "Build system"},
{"type": "docs", "section": "Documentation"},
{"type": "doc", "section": "Documentation"},
{"type": "style", "section": "Coding style"},
{"type": "refactor", "section": "Refactor"},
{"type": "refact", "section": "Refactor"},
{"type": "imp", "section": "Improvements"},
{"type": "improve", "section": "Improvements"},
{"type": "perf", "section": "Performance"},
{"type": "test", "section": "Tests"},
{"type": "ci", "section": "Continuous Integration"}
]
},
"writerOpts": {
"commitsSort": ["subject", "scope"]
}
}
],
"@semantic-release/github",
"semantic-release-yarn"
]
};
Logs
[9:09:45 PM] [semantic-release] › ℹ Running semantic-release version 24.0.0
[9:09:46 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/github"
[9:09:46 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "semantic-release-yarn"
[9:09:46 PM] [semantic-release] › ✔ Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[9:09:46 PM] [semantic-release] › ✔ Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[9:09:46 PM] [semantic-release] › ✔ Loaded plugin "prepare" from "semantic-release-yarn"
[9:09:46 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/github"
[9:09:46 PM] [semantic-release] › ✔ Loaded plugin "publish" from "semantic-release-yarn"
[9:09:46 PM] [semantic-release] › ✔ Loaded plugin "addChannel" from "@semantic-release/github"
[9:09:46 PM] [semantic-release] › ✔ Loaded plugin "addChannel" from "semantic-release-yarn"
[9:09:46 PM] [semantic-release] › ✔ Loaded plugin "success" from "@semantic-release/github"
[9:09:46 PM] [semantic-release] › ✔ Loaded plugin "fail" from "@semantic-release/github"
[9:09:48 PM] [semantic-release] › ✔ Run automated release from branch main on repository [email protected]:OpaleNet/workflows-test.git
[9:09:48 PM] [semantic-release] › ✔ Allowed to push to the Git repository
[9:09:48 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/github"
[9:09:48 PM] [semantic-release] [@semantic-release/github] › ℹ Verify GitHub authentication (https://api.github.com/)
[9:09:48 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/github"
[9:09:48 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "semantic-release-yarn"
[9:09:48 PM] [semantic-release] [semantic-release-yarn] › ℹ Verify yarn version is >= 2
[9:09:48 PM] [semantic-release] [semantic-release-yarn] › ℹ Reading yarn config from "/home/runner/work/workflows-test/workflows-test/.yarnrc.yml"
[9:09:48 PM] [semantic-release] [semantic-release-yarn] › ℹ Using registry "https://npm.pkg.github.com/" from ".yarnrc.yml: npmPublishRegistry"
[9:09:48 PM] [semantic-release] [semantic-release-yarn] › ℹ Using token from ".yarnrc.yml: npmRegistries["//npm.pkg.github.com"].npmAuthToken"
[9:09:48 PM] [semantic-release] [semantic-release-yarn] › ℹ Skipping authentication verification for non-default registry "https://npm.pkg.github.com/"
[9:09:48 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "semantic-release-yarn"
[9:09:48 PM] [semantic-release] › ℹ Found git tag v1.2.0 associated with version 1.2.0 on branch main
[9:09:48 PM] [semantic-release] › ℹ Found 12 commits since last release
[9:09:48 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: build: fix version 11 of commit-analyzer
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is patch
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: build: upgrade packages
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is patch
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: add debug
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: add debug
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: add debug
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: fix: use yarn run command instead of dlx
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is patch
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: fix: use workflow test repo
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is patch
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: build: yarn install
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is patch
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: monorepo
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: fix: test
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is patch
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: test
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: test
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[9:09:48 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analysis of 12 commits complete: patch release
[9:09:48 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[9:09:48 PM] [semantic-release] › ℹ The next release version is 1.2.1
[9:09:48 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[9:09:48 PM] [semantic-release] › ✘ Failed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[9:09:48 PM] [semantic-release] › ✘ An error occurred while running semantic-release: Error: Cannot find module 'conventional-changelog-conventionalcommits'
at importFrom (file:///home/runner/.yarn/berry/cache/import-from-esm-npm-1.3.4-52b9ecc4fb-10c0.zip/node_modules/import-from-esm/index.js:114:17)
at async default (file:///home/runner/work/workflows-test/workflows-test/.yarn/__virtual__/@semantic-release-release-notes-generator-virtual-1b11273d1f/4/.yarn/berry/cache/@semantic-release-release-notes-generator-npm-14.0.0-3cebb08479-10c0.zip/node_modules/@semantic-release/release-notes-generator/lib/load-changelog-config.js:27:63)
at async generateNotes (file:///home/runner/work/workflows-test/workflows-test/.yarn/__virtual__/@semantic-release-release-notes-generator-virtual-1b11273d1f/4/.yarn/berry/cache/@semantic-release-release-notes-generator-npm-14.0.0-3cebb08479-10c0.zip/node_modules/@semantic-release/release-notes-generator/index.js:34:38)
at async validator (file:///home/runner/.yarn/berry/cache/semantic-release-npm-24.0.0-9869a19b9c-10c0.zip/node_modules/semantic-release/lib/plugins/normalize.js:36:24)
at async file:///home/runner/.yarn/berry/cache/semantic-release-npm-24.0.0-9869a19b9c-10c0.zip/node_modules/semantic-release/lib/plugins/pipeline.js:38:36
at async file:///home/runner/.yarn/berry/cache/semantic-release-npm-24.0.0-9869a19b9c-10c0.zip/node_modules/semantic-release/lib/plugins/pipeline.js:32:5
at async pluginsConfigAccumulator.<computed> [as generateNotes] (file:///home/runner/.yarn/berry/cache/semantic-release-npm-24.0.0-9869a19b9c-10c0.zip/node_modules/semantic-release/lib/plugins/index.js:87:11)
at async run (file:///home/runner/.yarn/berry/cache/semantic-release-npm-24.0.0-9869a19b9c-10c0.zip/node_modules/semantic-release/index.js:200:23)
at async Module.default (file:///home/runner/.yarn/berry/cache/semantic-release-npm-24.0.0-9869a19b9c-10c0.zip/node_modules/semantic-release/index.js:278:22)
at async default (file:///home/runner/.yarn/berry/cache/semantic-release-npm-24.0.0-9869a19b9c-10c0.zip/node_modules/semantic-release/cli.js:55:5) {
code: 'MODULE_NOT_FOUND',
pluginName: '@semantic-release/release-notes-generator'
}
Error: Cannot find module 'conventional-changelog-conventionalcommits'
at importFrom (file:///home/runner/.yarn/berry/cache/import-from-esm-npm-1.3.4-52b9ecc4fb-10c0.zip/node_modules/import-from-esm/index.js:114:17)
at async default (file:///home/runner/work/workflows-test/workflows-test/.yarn/__virtual__/@semantic-release-release-notes-generator-virtual-1b11273d1f/4/.yarn/berry/cache/@semantic-release-release-notes-generator-npm-14.0.0-3cebb08479-10c0.zip/node_modules/@semantic-release/release-notes-generator/lib/load-changelog-config.js:27:63)
at async generateNotes (file:///home/runner/work/workflows-test/workflows-test/.yarn/__virtual__/@semantic-release-release-notes-generator-virtual-1b11273d1f/4/.yarn/berry/cache/@semantic-release-release-notes-generator-npm-14.0.0-3cebb08479-10c0.zip/node_modules/@semantic-release/release-notes-generator/index.js:34:38)
at async validator (file:///home/runner/.yarn/berry/cache/semantic-release-npm-24.0.0-9869a19b9c-10c0.zip/node_modules/semantic-release/lib/plugins/normalize.js:36:24)
at async file:///home/runner/.yarn/berry/cache/semantic-release-npm-24.0.0-9869a19b9c-10c0.zip/node_modules/semantic-release/lib/plugins/pipeline.js:38:36
at async file:///home/runner/.yarn/berry/cache/semantic-release-npm-24.0.0-9869a19b9c-10c0.zip/node_modules/semantic-release/lib/plugins/pipeline.js:32:5
at async pluginsConfigAccumulator.<computed> [as generateNotes] (file:///home/runner/.yarn/berry/cache/semantic-release-npm-24.0.0-9869a19b9c-10c0.zip/node_modules/semantic-release/lib/plugins/index.js:87:11)
at async run (file:///home/runner/.yarn/berry/cache/semantic-release-npm-24.0.0-9869a19b9c-10c0.zip/node_modules/semantic-release/index.js:200:23)
at async Module.default (file:///home/runner/.yarn/berry/cache/semantic-release-npm-24.0.0-9869a19b9c-10c0.zip/node_modules/semantic-release/index.js:278:22)
at async default (file:///home/runner/.yarn/berry/cache/semantic-release-npm-24.0.0-9869a19b9c-10c0.zip/node_modules/semantic-release/cli.js:55:5) {
code: 'MODULE_NOT_FOUND',
pluginName: '@semantic-release/release-notes-generator'
}
Previously, there was the same issue with @semantic-release/commit-analyzer
. According to this issue, it seems related to the usage of import-from-esm
in replacement of import-from
. So, it was fixed by set the resolution of @semantic-release/commit-analyzer
at the version 11.0.0
(the latest one using import-from
).
But, if I do the same thing with @semantic-release/release-notes-generator
(the latest version using import-from
is the 12.0.1
) other errors occurred obviously.
Let me know if more informations are needed.