Skip to content

Error [ERR_REQUIRE_ESM]: require() of ES Module #221

Closed
@xmnlab

Description

@xmnlab

Hi everyone!

running semantic-release in dry-run mode is raising the following error:

[11:29:37 PM] [semantic-release] › ℹ  Running semantic-release version 21.0.7
[11:29:37 PM] [semantic-release] › ✘  An error occurred while running semantic-release: Error [ERR_REQUIRE_ESM]: require() of ES Module /home/xmn/.npm/_npx/1bba8fa66517c824/node_modules/lodash-es/lodash.js from /home/xmn/.npm/_npx/1bba8fa66517c824/node_modules/semantic-release-replace-plugin/dist/index.js not supported.
Instead change the require of lodash.js in /home/xmn/.npm/_npx/1bba8fa66517c824/node_modules/semantic-release-replace-plugin/dist/index.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/home/xmn/.npm/_npx/1bba8fa66517c824/node_modules/semantic-release-replace-plugin/dist/index.js:70:19) {
  code: 'ERR_REQUIRE_ESM'
}
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/xmn/.npm/_npx/1bba8fa66517c824/node_modules/lodash-es/lodash.js from /home/xmn/.npm/_npx/1bba8fa66517c824/node_modules/semantic-release-replace-plugin/dist/index.js not supported.
Instead change the require of lodash.js in /home/xmn/.npm/_npx/1bba8fa66517c824/node_modules/semantic-release-replace-plugin/dist/index.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/home/xmn/.npm/_npx/1bba8fa66517c824/node_modules/semantic-release-replace-plugin/dist/index.js:70:19) {
  code: 'ERR_REQUIRE_ESM'
} 

I am not super familiar with nodejs ... any idea about what is happening?
thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions