swc-project / swc-node

Faster ts-node without typecheck
MIT License
1.78k stars 75 forks source link

Using `@swc/core` version `1.3.85` crashes #732

Closed biro456 closed 1 year ago

biro456 commented 1 year ago

I'm using Node 20.7.0 and calling my script like this:

node --loader @swc-node/register/esm ./script.js

When running with @swc/core version >=1.3.85 I get this error everytime.

[Error: unknown field `noInterop`, expected `resolveFully` at line 1 column 548] {
  code: 'InvalidArg'
}

If I use <=1.3.84 it works, so I went to @swc/core to investigate, and it seems 1.3.85 added this resolveFully option in several places, but noInterop was not removed.

kdy1 commented 1 year ago

noInterop should not be accepted, but it did because the Es6 variant was a unit type.

Yovach commented 1 year ago

Do you plan to update swc-node to fix this issue ?