-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
Closed as not planned
Closed as not planned
Copy link
Description
Version
20.19.0
Platform
Darwin <MyMachineName>.local 22.6.0 Darwin Kernel Version 22.6.0: Thu Sep 5 20:47:01 PDT 2024; root:xnu-8796.141.3.708.1~1/RELEASE_ARM64_T6000 arm64
Subsystem
No response
What steps will reproduce the bug?
Write a little executable JS script for running non-ESM TypeScript files using the @swc-node/register/register
import, and run it.
How often does it reproduce? Is there a required condition?
Every time.
What is the expected behavior? Why is that the expected behavior?
With Node 20.18.x or using the --no-experimental-require-module
with v20.19.0, this works.
The script should just run as it did before.With Node 20.18.x or using the --no-experimental-require-module
with v20.19.0, this works.
What do you see instead?
With 20.19.0, it gives the error: Error: Package subpath './register' is not defined by "exports"
error.
Additional information
It appears that the @swc-core/register
package defines the register
export as a require
. I suspect that this is causing node to just ignore it when imported.
Metadata
Metadata
Assignees
Labels
No labels