Skip to content

[v20.6] CJS runs repeatedly when there are circular dependencies when loaded by ESM #49497

Description

@liuxingbaoyu

Version

v20.6.0

Platform

all

Subsystem

No response

What steps will reproduce the bug?

https://github.com/liuxingbaoyu/node-v20.6-bug

How often does it reproduce? Is there a required condition?

always

What is the expected behavior? Why is that the expected behavior?

node .\main.js
run
success

What do you see instead?

node .\main.js
run
run
success

Additional information

This should be the regression introduced by v20.6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues and PRs for confirmed bugs.esmIssues and PRs related to the ECMAScript Modules implementation.moduleIssues and PRs related to the module subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions