You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to use index.mjs or index.js in the extends key of the semantic release config with a package.json using type: module, this error shows up:
[10:36:36 PM] [semantic-release] » ✘ An error occurred while running semantic-release: Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Projects\semantic-release-monorepo\index.js from C:\Projects\semantic-release-monorepo\node_modules\semantic-release\lib\get-config.js not supported.
Instead change the require of index.js in C:\Projects\semantic-release-monorepo\node_modules\semantic-release\lib\get-config.js to a dynamic import() which is available in all CommonJS modules.
at file:///C:/Projects/semantic-release-monorepo/node_modules/semantic-release/lib/get-config.js:38:32
at async default (file:///C:/Projects/semantic-release-monorepo/node_modules/semantic-release/lib/get-config.js:36:11)
at async Module.default (file:///C:/Projects/semantic-release-monorepo/node_modules/semantic-release/index.js:271:34)
at async default (file:///C:/Projects/semantic-release-monorepo/node_modules/semantic-release/cli.js:55:5) {
code: 'ERR_REQUIRE_ESM'
}
Expected behavior
No error
semantic-release version
22.0.6
CI environment
Github
Plugins used
No response
semantic-release configuration
{
"extends": ["./index.js"]
}
CI logs
yarn semantic-release --debug --dry-run
[10:36:36 PM] [semantic-release] » ℹ Running semantic-release version 22.0.6
semantic-release:config load config from: C:\Projects\semantic-release-monorepo\.releaserc.json +0ms
[10:36:36 PM] [semantic-release] » ✘ An error occurred while running semantic-release: Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Projects\semantic-release-monorepo\index.js from C:\Projects\semantic-release-monorepo\node_modules\semantic-release\lib\get-config.js not supported.
Instead change the require of index.js in C:\Projects\semantic-release-monorepo\node_modules\semantic-release\lib\get-config.js to a dynamic import() which is available in all CommonJS modules.
at file:///C:/Projects/semantic-release-monorepo/node_modules/semantic-release/lib/get-config.js:38:32
at async default (file:///C:/Projects/semantic-release-monorepo/node_modules/semantic-release/lib/get-config.js:36:11)
at async Module.default (file:///C:/Projects/semantic-release-monorepo/node_modules/semantic-release/index.js:271:34)
at async default (file:///C:/Projects/semantic-release-monorepo/node_modules/semantic-release/cli.js:55:5) {
code: 'ERR_REQUIRE_ESM'
}
Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Projects\semantic-release-monorepo\index.js from C:\Projects\semantic-release-monorepo\node_modules\semantic-release\lib\get-config.js not supported.
Instead change the require of index.js in C:\Projects\semantic-release-monorepo\node_modules\semantic-release\lib\get-config.js to a dynamic import() which is available in all CommonJS modules.
at file:///C:/Projects/semantic-release-monorepo/node_modules/semantic-release/lib/get-config.js:38:32
at async default (file:///C:/Projects/semantic-release-monorepo/node_modules/semantic-release/lib/get-config.js:36:11)
at async Module.default (file:///C:/Projects/semantic-release-monorepo/node_modules/semantic-release/index.js:271:34)
at async default (file:///C:/Projects/semantic-release-monorepo/node_modules/semantic-release/cli.js:55:5) {
code: 'ERR_REQUIRE_ESM'
}
The text was updated successfully, but these errors were encountered:
Current behavior
When I try to use
index.mjs
orindex.js
in the extends key of the semantic release config with a package.json usingtype: module
, this error shows up:Expected behavior
No error
semantic-release
version22.0.6
CI environment
Github
Plugins used
No response
semantic-release
configuration{
"extends": ["./index.js"]
}
CI logs
The text was updated successfully, but these errors were encountered: