

However, given that ts-node is transpiling on the fly, I would expect it to be able to find the references in tsconfig.json and build the required dependencies. Hmm, my issue seems to also be related to #897, as I’m working in a monorepo (not lerna, just a yarn PnP monorepo) and the module not being found is being referenced as and in package.json, the dependency entry for it is workspace:packages/mycomponent. I talk about this in #1111 under “Missing is a runtime resolver” We need to teach node to do the same mappings that TypeScript does. This is halfway there: the typechecker understands to typecheck against index.ts, but node does not understand which file to load. It understands because the referenced tsconfig has rootDir and outDir, which map between src and lib. #1111 teach ts-node to do the necessary configuration, so that TS understands. ts-node will not be executing the source. This may technically work, but is non-ideal: TS will typecheck against. As you said, there are 2 possibilities when tries to load it is has been pre-compiled and. If Windows, are you using WSL or WSL2?: you understand the core issue pretty well."project": "/ts-node-repro/b/btest/tsconfig.json" "projectSearchDir": "\\ts-node-repro\\b\\btest", Please see the reproduction repo for the tsconfig structure, here is the effective tsconfig: I’ve created a minimal reproduction repo for my scenario here with the behaviour/stack trace and command to reproduce. I get a TSError warning me about missing dependencies (the README linked below) when ts-node tries to load a referenced project. I would expect code that doesn’t error when trying to compile it with tsc to compile when run through ts-node.
