tsconfig's compilerOptions' paths setting ignored
See original GitHub issueTypeScript allows to modify module resolution using the paths
configuration option on the compilerOptions
object. The mechanics of this are described in https://www.typescriptlang.org/docs/handbook/module-resolution.html. This feature is necessary for avoiding the relative path hell by aliasing the root of the current project, and importing files relative to that root.
Currently imports that contain an alias from the paths
configuration are reported with the “Cannot find module” error, even though tsc resolves them correctly.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:17
- Comments:16 (1 by maintainers)
Top Results From Across the Web
Why are these tsconfig paths not working? - Stack Overflow
But with some packages (tsc-alias & module-alias), it works. No babel or webpack setup are required. // tsconfig.json { "compilerOptions": { ...
Read more >TSConfig Reference - Docs on every TSConfig option
All relative paths found in the configuration file will be resolved relative to the ... code is ignored; false raises compiler errors about...
Read more >How to solve the problem with unresolved path aliases in ...
js file containing the line with the path alias. The actual cause of the issue is that the tsc compiler does not transpiles...
Read more >Options | ts-node
Most options can be declared in your tsconfig.json: Configuration via tsconfig. ... -vvv includes absolute paths to ts-node and typescript installations.
Read more >Typescript Compiler not ignoring excluded paths - YouTrack
1. Add a directory (root -> directory) with typescript files in it. · 2. Add this directory to the "exclude" option in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1 for this issue.
Has anyone ever gotten this to work? I define paths and if I use them e.g. in triple slash directives and hover over them, however, I get: Cannot find type definition file for ‘@yadayada/test’. So it seems the @yadayada is not even resolved in the first place…?