-
Notifications
You must be signed in to change notification settings - Fork 80
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
ERR_REQUIRED_ESM error with semantic-release/gitlab #136
Comments
@semantic-release/gitlab was recently changed to ESM only. As #135 describes this is most likely the cause for your error. |
Same is happening with other parts of semantic-release, I guess this plugin needs to be updated to ESM to continue working...
Edit: Looks like there's a PR #137 |
Use temporary forks with pmowrer/semantic-release-monorepo#137 and pmowrer/semantic-release-plugin-decorators#31 applied to work around pmowrer/semantic-release-monorepo#136
Use temporary forks with pmowrer/semantic-release-monorepo#137 and pmowrer/semantic-release-plugin-decorators#31 applied to work around pmowrer/semantic-release-monorepo#136
same problems. [10:45:04 AM] [semantic-release] › ✘ An error occurred while running semantic-release: Error [ERR_REQUIRE_ESM]: require() of ES Module /home/runner/work/scene/scene/node_modules/@semantic-release/commit-analyzer/index.js from /home/runner/work/scene/scene/node_modules/semantic-release-plugin-decorators/src/wrapStep.js not supported.
Instead change the require of index.js in /home/runner/work/scene/scene/node_modules/semantic-release-plugin-decorators/src/wrapStep.js to a dynamic import() which is available in all CommonJS modules.
at semantic-release-monorepo (/home/runner/work/scene/scene/node_modules/semantic-release-plugin-decorators/src/wrapStep.js:49:24)
at validator (file:///home/runner/work/scene/scene/node_modules/semantic-release/lib/plugins/normalize.js:36:30)
at file:///home/runner/work/scene/scene/node_modules/semantic-release/lib/plugins/pipeline.js:[38](https://github.com/alovajs/scene/actions/runs/5411307043/jobs/9833872625#step:5:39):[42](https://github.com/alovajs/scene/actions/runs/5411307043/jobs/9833872625#step:5:43)
at next (file:///home/runner/work/scene/scene/node_modules/semantic-release/node_modules/p-reduce/index.js:16:10) {
code: 'ERR_REQUIRE_ESM',
pluginName: '[Function: semantic-release-monorepo]'
}
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/runner/work/scene/scene/node_modules/@semantic-release/commit-analyzer/index.js from /home/runner/work/scene/scene/node_modules/semantic-release-plugin-decorators/src/wrapStep.js not supported.
Instead change the require of index.js in /home/runner/work/scene/scene/node_modules/semantic-release-plugin-decorators/src/wrapStep.js to a dynamic import() which is available in all CommonJS modules.
at semantic-release-monorepo (/home/runner/work/scene/scene/node_modules/semantic-release-plugin-decorators/src/wrapStep.js:[49](https://github.com/alovajs/scene/actions/runs/5411307043/jobs/9833872625#step:5:50):24)
at validator (file:///home/runner/work/scene/scene/node_modules/semantic-release/lib/plugins/normalize.js:36:30)
at file:///home/runner/work/scene/scene/node_modules/semantic-release/lib/plugins/pipeline.js:38:42
at next (file:///home/runner/work/scene/scene/node_modules/semantic-release/node_modules/p-reduce/index.js:16:10) {
code: 'ERR_REQUIRE_ESM',
pluginName: '[Function: semantic-release-monorepo]'
}npm ERR! Lifecycle script `release` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: @alova/[email protected]
npm ERR! at location: /home/runner/work/scene/scene/packages/scene-vue
Error: Process completed with exit code 1. |
Related issue in the @semantic-release/gitlab project: semantic-release/gitlab#493 The solution appears to be downgrade to @semantic-release/gitlab v9 until semantic-release-monorepo is updated to support ESM. This worked for me. |
I created #138 to document which plugins need to be downgraded due to lack of ESM support in semantic-release-monorepo. |
I published a new package semantic-release-monorepo-esm that supports esm. v1.0.10 should work without issues. |
@bryanjtc : Just wondering why don't you just start a new repo completely based on what you have done? I think it is awesome that you get to work on this. I really find that this repo is not really maintained. I'm actually looking at other solutions and migrating our codebase away from this |
I have been thinking to do that for a while now. The plan is to keep updating |
@karlo-humanmanaged @jcapogna NPM package: https://www.npmjs.com/package/@rimac-technology/semantic-release-monorepo |
🎉 This issue has been resolved in version 8.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Which issue? |
Hi, I'm not sure if this error is from
semantic-release-monorepo
or from@semantic-release/gitlab
I have posted it here:
semantic-release/gitlab#493
and here's the error:
The text was updated successfully, but these errors were encountered: