You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a script.ts, when I run it (script.js) with node, no problem, but when I run ts-node directly against script.ts, I get this error:
alex.mills@alexdomain-haven%ts-node/Users/alex.mills/codes/oresoftware/domain-haven/test/src/perf/simple-perf-server.ts{d: 'async-hook-domain'}appislistening.caughtan error Error: aatTimeout._onTimeout(/Users/alex.mills/codes/oresoftware/domain-haven/test/src/perf/simple-perf-server.ts:45:14)atlistOnTimeout(node:internal/timers:573:17)atprocessTimers(node:internal/timers:514:7)
node:domain:136throwerr;^Error[ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE]: The`domain`moduleisinuse,whichismutuallyexclusivewithcallingprocess.setUncaughtExceptionCaptureCallback()atnewNodeError(node:internal/errors:405:5)atprocess.setUncaughtExceptionCaptureCallback(node:domain:134:15)atprocess.domainErrorHandler(/Users/alex.mills/codes/oresoftware/domain-haven/node_modules/async-hook-domain/src/index.ts:140:12)atprocess.emit(node:events:514:28)atprocess.emit(node:domain:489:12)atprocess.emit.sharedData.processEmitHook.installedValue(/Users/alex.mills/.nvm/versions/node/v20.5.1/lib/node_modules/ts-node/node_modules/@cspotcode/source-map-support/source-map-support.js:745:40)atprocess.domainProcessEmit[asemit](/Users/alex.mills/codes/oresoftware/domain-haven/node_modules/async-hook-domain/src/index.ts:100:32)atprocess._fatalException(node:internal/process/execution:156:13)----------------------------------------Error: require(`domain`)atthispoint
at node:domain:130:28atBuiltinModule.compileForInternalLoader(node:internal/bootstrap/realm:392:7)atrequireBuiltin(node:internal/bootstrap/realm:423:14)
at node:repl:140:16atBuiltinModule.compileForInternalLoader(node:internal/bootstrap/realm:392:7)atBuiltinModule.compileForPublicLoader(node:internal/bootstrap/realm:328:10)atloadBuiltinModule(node:internal/modules/helpers:68:7)atModule._load(node:internal/modules/cjs/loader:916:17)atModule.require(node:internal/modules/cjs/loader:1115:19)atrequire(node:internal/modules/helpers:130:18){code: 'ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE'}Node.jsv20.5.1
this is sadly a weird one, not sure why ts-node would load domain somewhere, whereas transpiling wouldn't -
but it could also lead to a fruitful discussion somewhere too.
Using Node.js 20.5.1 everywhere here.
The text was updated successfully, but these errors were encountered:
I have a
script.ts
, when I run it (script.js) with node, no problem, but when I runts-node
directly againstscript.ts
, I get this error:this is sadly a weird one, not sure why ts-node would load domain somewhere, whereas transpiling wouldn't -
but it could also lead to a fruitful discussion somewhere too.
Using Node.js 20.5.1 everywhere here.
The text was updated successfully, but these errors were encountered: