-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Closed
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.loadersIssues and PRs related to ES module loadersIssues and PRs related to ES module loaders
Description
Version
23.0.0
Platform
Darwin Nics-MacBook-Air.local 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:16:46 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T8112 arm64
Subsystem
No response
What steps will reproduce the bug?
EDIT: See in #55500 (comment) for a minimal reproduction
- Clone https://github.com/nicolo-ribaudo/babel/tree/node-bug
- Run
yarn install
- Run
make use-esm
- Run
(cd ./packages/babel-core/test/fixtures/async/plugin-mjs-tla-native; node ../../babel-compile-async.mjs ./input.js)
How often does it reproduce? Is there a required condition?
I don't have a minimal reproduction
What is the expected behavior? Why is that the expected behavior?
To not tell me to open a bug report :P
What do you see instead?
(node:69972) ExperimentalWarning: Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
node:internal/assert:11
throw new ERR_INTERNAL_ASSERTION(message);
^
Error [ERR_INTERNAL_ASSERTION]: [BABEL]: A require()-d module that is imported again must be evaluated. Status = 2
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
(While processing: /Users/nic/Documents/dev/github.com/babel/babel/packages/babel-core/test/fixtures/async/plugin-mjs-tla-native/plugin.js)
at assert (node:internal/assert:11:11)
at ModuleJobSync.run (node:internal/modules/esm/module_job:358:5)
at onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:543:42)
at async loadMjsFromPath (file:///Users/nic/Documents/dev/github.com/babel/babel/packages/babel-core/lib/config/files/module-types.js:45:12) {
code: 'ERR_INTERNAL_ASSERTION'
}
Additional information
I don't think I'm using Node.js internals.
cc @joyeecheung
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.loadersIssues and PRs related to ES module loadersIssues and PRs related to ES module loaders