swc-project / swc-node

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

New version (1.10.1) is broken #802

Closed hax closed 4 months ago

hax commented 4 months ago

node --enable-source-maps --no-warnings --import @swc-node/register/esm-register index.ts

And index.ts has line import simpleGit from 'simple-git', cause error:

node:internal/modules/run_main:129
    triggerUncaughtException(
    ^
Error: Cannot find module 'child_process': child_process cannot be resolved in file:///test/node_modules/simple-git/dist/esm/index.js
    at resolve (/test/node_modules/@swc-node/register/esm.mts:195:11)
    at async nextResolve (node:internal/modules/esm/hooks:866:22)
    at async Hooks.resolve (node:internal/modules/esm/hooks:304:24)
    at async handleMessage (node:internal/modules/esm/worker:196:18)

Rollback to 1.10.0 works.