-
Notifications
You must be signed in to change notification settings - Fork 12
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
Cannot find module 'semantic-release-replace-plugin' #223
Comments
Same issue here using this plugin with 1.2.4 and Node 18.16.1. |
Same issue here with semantic-release-replace-plugin@1.2.4 and Node v19.1.0 |
Same issue here! |
+1 |
I'm also looking for fix, thank you |
Is everyone using the plugin with the GitHub action, cycjimmy/semantic-release-action? |
no, I'm building my own pipeline in github-ci, but as guys mention above it does not work. |
should be fixed with bef4c0a. I knew it had to be something super silly! |
Please test with version >= 1.2.6, https://www.npmjs.com/package/semantic-release-replace-plugin/v/1.2.6. |
With the latest version I am getting a new error
This might be because I am using Node version 14 as mentioned above. |
Hello everyone! I've returned to this plugin for bump python version via CI/CD but still couldn't make it :( @jpoehnelt , could you take a look, please? spoilerError bash-5.1# semantic-release
[2:09:07 AM] [semantic-release] › ℹ Running semantic-release version 19.0.5
[2:09:08 AM] [semantic-release] › ✖ An error occurred while running semantic-release: Error: Cannot find module 'semantic-release-replace-plugin'
Require stack:
- /builds/infrastructure/playground/a.horbach/sermver-playground/noop.js
at Module._resolveFilename (node:internal/modules/cjs/loader:939:15)
at resolveFileName (/usr/local/lib/node_modules/semantic-release/node_modules/resolve-from/index.js:29:39)
at resolveFrom (/usr/local/lib/node_modules/semantic-release/node_modules/resolve-from/index.js:43:9)
at module.exports (/usr/local/lib/node_modules/semantic-release/node_modules/resolve-from/index.js:46:47)
at loadPlugin (/usr/local/lib/node_modules/semantic-release/lib/plugins/utils.js:51:82)
at /usr/local/lib/node_modules/semantic-release/lib/plugins/index.js:17:37
at Array.reduce (<anonymous>)
at module.exports (/usr/local/lib/node_modules/semantic-release/lib/plugins/index.js:14:34)
at module.exports (/usr/local/lib/node_modules/semantic-release/lib/get-config.js:84:35)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/builds/infrastructure/playground/a.horbach/sermver-playground/noop.js'
]
}
Error: Cannot find module 'semantic-release-replace-plugin'
Require stack:
- /builds/infrastructure/playground/a.horbach/sermver-playground/noop.js
at Module._resolveFilename (node:internal/modules/cjs/loader:939:15)
at resolveFileName (/usr/local/lib/node_modules/semantic-release/node_modules/resolve-from/index.js:29:39)
at resolveFrom (/usr/local/lib/node_modules/semantic-release/node_modules/resolve-from/index.js:43:9)
at module.exports (/usr/local/lib/node_modules/semantic-release/node_modules/resolve-from/index.js:46:47)
at loadPlugin (/usr/local/lib/node_modules/semantic-release/lib/plugins/utils.js:51:82)
at /usr/local/lib/node_modules/semantic-release/lib/plugins/index.js:17:37
at Array.reduce (<anonymous>)
at module.exports (/usr/local/lib/node_modules/semantic-release/lib/plugins/index.js:14:34)
at module.exports (/usr/local/lib/node_modules/semantic-release/lib/get-config.js:84:35)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/builds/infrastructure/playground/a.horbach/sermver-playground/noop.js'
] package:
My cfg: {
"branches": ["master", "feature/typer"],
"tagFormat": "${version}",
"plugins": [
"@semantic-release/gitlab",
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"releaseRules": [
{"type": "breaking", "release": "major"},
{"type": "feat", "release": "minor"},
{"type": "docs", "release": false},
{"type": "fix", "release": "patch"},
{"type": "style", "release": false},
{"type": "refactor", "release": false},
{"type": "chore", "release": "patch"}
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{"type": "breaking", "section": "Breaking Change"},
{"type": "feat", "section": "Feature"},
{"type": "docs", "section": "Documentation"},
{"type": "fix", "section": "Fix"},
{"type": "style", "section": "Style"},
{"type": "refactor", "section": "Refactoring"},
{"type": "chore", "section": "Chore"}
]
}
}
],
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md"
}
],
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md"
],
"message": "release: ${lastRelease.version} -> ${nextRelease.version}\n\n${nextRelease.notes}"
}
],
[
"semantic-release-replace-plugin",
{
"replacements": [
{
"files": ["foo/__init__.py"],
"from": "__VERSION__ = \".*\"",
"to": "__VERSION__ = \"${nextRelease.version}\"",
"results": [
{
"file": "foo/__init__.py",
"hasChanged": true,
"numMatches": 1,
"numReplacements": 1
}
],
"countMatches": true
}
]
}
]
]
}
Dockerfile: FROM alpine:3.18.2
RUN apk add --no-cache \
git~=2.40\
python3~=3.11.4 \
py3-pip~=23.1.2 \
&& apk add --no-cache --virtual .build-deps \
py3-cryptography~=40.0.2 \
&& pip install --no-cache-dir \
black==23.3.0 \
flake8==6.0.0 \
bumpversion==0.6.0 \
mkdocs-material==9.1.18 \
mkdocs-mermaid2-plugin==0.6.0 \
mkdocs-awesome-pages-plugin==2.9.1 \
poetry==1.5.1 \
pygments==2.15.1 \
pylint==2.17.4 \
twine==4.0.2 \
wheel==0.40.0 \
&& apk del .build-deps
RUN addgroup --gid 10001 app \
&& adduser \
--uid 10001 \
--home /home/app \
--shell /bin/ash \
--ingroup app \
--disabled-password \
app
USER 10001
WORKDIR /home/app
ENTRYPOINT [ "" ] |
Since version 1.2.1 and later I get the following error in my GitHub workflow that runs semantic release:
I had to downgrade to
@google/semantic-release-replace-plugin@1.2.0
to make it work again.Maybe this error has something to do with Node 14 which I have to use in order to fix this issue
My (failing) workflow:
The text was updated successfully, but these errors were encountered: