Skip to content

fix: only fallback to import if requiring fails with esm/async error#716

Merged
mshima merged 1 commit intoyeoman:mainfrom
mshima:require
Feb 5, 2026
Merged

fix: only fallback to import if requiring fails with esm/async error#716
mshima merged 1 commit intoyeoman:mainfrom
mshima:require

Conversation

@mshima
Copy link
Copy Markdown
Member

@mshima mshima commented Feb 5, 2026

This can cause duplicate require/import in specific cases when the modules fails to load due to others erros.

ERROR! ERROR! Unexpected status of a module that is imported again after being required. Status = 0
This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues

Purpose of this pull request?

  • Documentation update
  • Bug fix
  • Enhancement
  • Other, please explain:

What changes did you make?

Is there anything you'd like reviewers to focus on?

This can cause duplicate require/import in specific cases when the modules fails to load due to others problems like in vitest.
@mshima mshima merged commit e4fb745 into yeoman:main Feb 5, 2026
18 checks passed
@mshima mshima deleted the require branch February 5, 2026 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant