soft@HPFFCDE2 juice-shop % npx appmap-agent-js --scenario=mocha
APPMAP-INFO Trace port: 62093
APPMAP-WARNING The mocha recorder cannot recursively record processes.
(node:59418) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
APPMAP-INFO Please, ignore node's deprecated warning about outdated transformSource loader hook (if present).
(node:59418) DeprecationWarning: Obsolete loader hook(s) supplied and will be ignored: transformSource
(node:59418) DeprecationWarning: Obsolete loader hook(s) supplied and will be ignored: transformSource
APPMAP-INFO Caught process 59418
APPMAP-INFO Recording file:///Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/.bin/mocha.
Error: Debug Failure. False expression: Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.
at Object.resolveTypeReferenceDirective (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/typescript/lib/typescript.js:42530:18)
at /Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/ts-node/src/index.ts:623:55
at Array.map (<anonymous>)
at Object.resolveTypeReferenceDirectives (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/ts-node/src/index.ts:622:33)
at actualResolveTypeReferenceDirectiveNamesWorker (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/typescript/lib/typescript.js:116611:163)
at resolveTypeReferenceDirectiveNamesWorker (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/typescript/lib/typescript.js:116911:26)
at processTypeReferenceDirectives (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/typescript/lib/typescript.js:118393:31)
at findSourceFileWorker (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/typescript/lib/typescript.js:118278:21)
at findSourceFile (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/typescript/lib/typescript.js:118133:26)
at /Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/typescript/lib/typescript.js:118085:85
at getSourceFileFromReferenceWorker (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/typescript/lib/typescript.js:118051:34)
at processSourceFile (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/typescript/lib/typescript.js:118085:13)
at processTypeReferenceDirectiveWorker (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/typescript/lib/typescript.js:118424:21)
at processTypeReferenceDirective (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/typescript/lib/typescript.js:118409:13)
at Object.createProgram (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/typescript/lib/typescript.js:116714:21)
at synchronizeHostData (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/typescript/lib/typescript.js:165000:26)
at Object.getProgram (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/typescript/lib/typescript.js:165132:13)
at getOutput (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/ts-node/src/index.ts:731:39)
at Object.compile (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/ts-node/src/index.ts:968:32)
at Module.m._compile (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/ts-node/src/index.ts:1056:42)
at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Object.require.extensions.<computed> [as .ts] (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/ts-node/src/index.ts:1059:12)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.exports.requireOrImport (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/mocha/lib/esm-utils.js:42:12)
at Object.exports.loadFilesAsync (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/mocha/lib/esm-utils.js:55:34)
at Mocha.loadFilesAsync (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/mocha/lib/mocha.js:473:19)
at singleRun (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/mocha/lib/cli/run-helpers.js:125:15)
at exports.runMocha (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/mocha/lib/cli/run-helpers.js:190:10)
at Object.exports.handler (/Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/mocha/lib/cli/run.js:362:11)
at /Users/soft/Desktop/workspace/juice-setup/juice-shop/node_modules/mocha/node_modules/yargs/build/index.cjs:443:71
APPMAP-INFO > Exited with: 1
soft@HPFFCDE2 juice-shop %
The agent crash on recording mocha test with the current version of the juice-shop: https://github.com/juice-shop/juice-shop/tree/87a6365c283e4176c32e654bd9a69f7e9c1a5959