-
Notifications
You must be signed in to change notification settings - Fork 47
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
MODULE_NOT_FOUND
when running with npx
#565
Comments
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
I am not even using 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 |
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
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
Previously, there was the same issue with Let me know if more informations are needed. |
I have a github action which executes
semantic-release
withnpx
. The project does not have apackage.json
.Everything seems to work fine, before failing with error
Cannot find module 'conventional-changelog-conventionalcommits'
.releaserc.yml
workflow.yml
logs
The text was updated successfully, but these errors were encountered: