Comments (11)
Please test with version >= 1.2.6, https://www.npmjs.com/package/semantic-release-replace-plugin/v/1.2.6.
from semantic-release-replace-plugin.
Hello everyone!
I've returned to this plugin for bump python version via CI/CD but still couldn't make it :(
Sheck the error and my settings under the spoiler
@jpoehnelt , could you take a look, please?
spoiler
Error
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:
bash-5.1# npm list -g
/usr/local/lib
+-- @google/[email protected]
+-- @semantic-release/[email protected]
+-- @semantic-release/[email protected]
+-- @semantic-release/[email protected]
+-- @semantic-release/[email protected]
+-- @semantic-release/[email protected]
+-- @semantic-release/[email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
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 [ "" ]
from semantic-release-replace-plugin.
Same issue here using this plugin with 1.2.4 and Node 18.16.1.
Note: this is working properly when using the new version of @google/[email protected].
from semantic-release-replace-plugin.
Same issue here with [email protected] and Node v19.1.0
from semantic-release-replace-plugin.
Same issue here!
from semantic-release-replace-plugin.
+1
from semantic-release-replace-plugin.
I'm also looking for fix, thank you
from semantic-release-replace-plugin.
Is everyone using the plugin with the GitHub action, cycjimmy/semantic-release-action?
from semantic-release-replace-plugin.
no, I'm building my own pipeline in github-ci, but as guys mention above it does not work.
When I enable your module via .realease.json - semantic-cli crashes exactly like the issue author mention
from semantic-release-replace-plugin.
should be fixed with bef4c0a. I knew it had to be something super silly!
from semantic-release-replace-plugin.
With the latest version I am getting a new error
[9:28:45 AM] [semantic-release] › ℹ Running semantic-release version 19.0.5
[9:28:46 AM] [semantic-release] › ✖ An error occurred while running semantic-release: Error [ERR_REQUIRE_ESM]: require() of ES Module /home/runner/work/_actions/cycjimmy/semantic-release-action/v3/node_modules/semantic-release-replace-plugin/dist/index.js from /home/runner/work/_actions/cycjimmy/semantic-release-action/v3/node_modules/semantic-release/lib/plugins/utils.js not supported.
Error: Error [ERR_REQUIRE_ESM]: require() of ES Module /home/runner/work/_actions/cycjimmy/semantic-release-action/v3/node_modules/semantic-release-replace-plugin/dist/index.js from /home/runner/work/_actions/cycjimmy/semantic-release-action/v3/node_modules/semantic-release/lib/plugins/utils.js not supported.
Instead change the require of index.js in /home/runner/work/_actions/cycjimmy/semantic-release-action/v3/node_modules/semantic-release/lib/plugins/utils.js to a dynamic import() which is available in all CommonJS modules.
Instead change the require of index.js in /home/runner/work/_actions/cycjimmy/semantic-release-action/v3/node_modules/semantic-release/lib/plugins/utils.js to a dynamic import() which is available in all CommonJS modules.
at loadPlugin (/home/runner/work/_actions/cycjimmy/semantic-release-action/v3/node_modules/semantic-release/lib/plugins/utils.js:51:36)
at /home/runner/work/_actions/cycjimmy/semantic-release-action/v3/node_modules/semantic-release/lib/plugins/index.js:17:37
at Array.reduce (<anonymous>)
at module.exports (/home/runner/work/_actions/cycjimmy/semantic-release-action/v3/node_modules/semantic-release/lib/plugins/index.js:[14](https://github.com/Aam-Digital/ndb-core/actions/runs/5573981595/jobs/10181993405#step:4:15):34)
at module.exports (/home/runner/work/_actions/cycjimmy/semantic-release-action/v3/node_modules/semantic-release/lib/get-config.js:84:35)
at async module.exports (/home/runner/work/_actions/cycjimmy/semantic-release-action/v3/node_modules/semantic-release/index.js:265:32)
at async release (/home/runner/work/_actions/cycjimmy/semantic-release-action/v3/src/index.js:30:[18](https://github.com/Aam-Digital/ndb-core/actions/runs/5573981595/jobs/10181993405#step:4:19)) {
code: 'ERR_REQUIRE_ESM'
This might be because I am using Node version 14 as mentioned above.
from semantic-release-replace-plugin.
Related Issues (12)
- Multiline mode HOT 3
- Feature request to support major version, minor version only replacement? HOT 12
- Feature request to target only specific branches HOT 1
- matches not found in google action HOT 3
- Conditional replace file HOT 5
- Skip step "prepare" of plugin "@google/semantic-release-replace-plugin" in dry-run mode HOT 4
- Error running on Gitlab CI HOT 2
- Error [ERR_REQUIRE_ESM]: require() of ES Module HOT 10
- Release `1.2.7` should be a major release, or at the very least a minor HOT 1
- Match not found semantic-release-replace-plugin HOT 1
- Increment value HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from semantic-release-replace-plugin.