Why doesn't ts-node resolve ts-config as a symlink correctly

81 views Asked by At

I have recently setup a TurboRepo project using PNPM, however I'm having difficulties getting ts-node to pick up a shared tsconfig.

TSError: ⨯ Unable to compile TypeScript:
error TS6053: File '@Repo/typescript-config/base.json' not found.

File Structure:


 |- tsconfig.json // extends @Repo/typescript-config/base.json
 |- packages
 |-- cli
 |--- tsconfig.json // extends @Repo/typescript-config/base.json
 |--- src
 |---- cli.ts
 | 
 |-- typescript-config
 |--- base.json


packages/cli/tsconfig.json

{
  "extends": "@Repo/typescript-config/base.json",
  "include": ["src"]
}

packages/cli/package.json

{
  "name": "@Repo/cli",
  "version": "0.0.0",
  "files": [],
  "private": true,
  "devDependencies": {
    "@Repo/eslint-config": "workspace:*",
    "@Repo/typescript-config": "workspace:*",
    "typescript": "^5.2.2",
    "ts-node": "^10.9.1"
  },
  "dependencies": {
    "commander": "^11.1.0"
  }
}

This doesn't seem to show any TS errors from within any of the ts-configs, so the linking seems to be setup correctly, it's only when running ts-node that the errors occur.

0

There are 0 answers