swc-project / swc-node

Faster ts-node without typecheck
MIT License
1.81k stars 76 forks source link

@swc/core 1.4.12 break @swc-node/register/esm-register #765

Closed zckrs closed 4 months ago

zckrs commented 7 months ago

Just update our package-lock.json and node --import @swc-node/register/esm-register source/server.ts fail

❯ node --import @swc-node/register/esm-register source/server.ts

node:internal/process/esm_loader:40
      internalBinding('errors').triggerUncaughtException(
                                ^
Error: Bindings not found.

source/server.js

import {hostname as getHostname} from 'node:os';

const hostname = getHostname()';
console.log(hostname)