-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Description
There's an issue with properly loading absolute paths.
Basically, we have a root tsconfig base:
{
"compilerOptions": {
...
"paths": {
"entities/*": ["./app/entities/*"],
}
},
"ts-node": {
"require": ["tsconfig-paths/register"]
}
}
Then we have another part of the app that tries to use that configuration but instead of fails:
C:\src\sample-paths\app\function> npm run start
> [email protected] start
> ts-node index.ts
Error: Cannot find module 'entities/SimpleClass'
Require stack:
- C:\src\sample-paths\app\function\index.ts
This works if I either set baseUrl: "." in the root tsconfig, or duplicate the paths inside the inner tsconfig.json
I've created a very simple reproducible repository here https://github.com/taeemo/ts-paths-issue
I've checked a bunch of tickets from this repo, this one seems similar #190 but not super sure.
hamidrezahanafifaisal-hameed
Metadata
Metadata
Assignees
Labels
No labels