$ yarn tsx foobar.ts
node:fs:1596
handleErrorFromBinding(ctx);
^
Error: ENOTDIR: not a directory, stat '/app/.yarn/cache/tsx-npm-3.8.0-0fd68bdcc5-2990425ad0.zip/node_modules/tsx/dist/loader.js'
errno: -20,
syscall: 'stat',
code: 'ENOTDIR',
path: '/app/.yarn/cache/tsx-npm-3.8.0-0fd68bdcc5-2990425ad0.zip/node_modules/tsx/dist/loader.js'
}
Node.js v18.7.0
System:
OS:
CPU:
Shell:
Binaries:
Node: v18.7.0
npm:
npmPackages:
tsx:
Bug description
ENOTDIRwhen using tsx undernode:18.7.0which support chaining loaderhttps://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#2022-07-13-version-1860-current-targos
nodejs/node#42623
Reproduction
Environment
Can you contribute a fix?