-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paths resolve to the wrong dir (tsc-alias debug: default replacer - Invalid path ) #134
Comments
+1 bug with default replacer {
"baseUrl": ".",
"outDir": "lib",
"paths": [
"#app": [
"node_modules/nuxt/dist/app"
]
]
} Alias after {
shouldPrefixMatchWildly: false,
prefix: '#app',
paths: [
{
path: 'node_modules/nuxt/dist/app',
basePath: '/my/user/dir/projects/project-name/lib',
isExtra: false
}
]
} After normalize path Can't say Have same alias for another module in
|
I ran into this issue today, and have a workaround that works in my project. Here is the tsc-alias --verbose --debug Here is my relevant {
"compilerOptions": {
"outDir": "./dist",
"baseUrl": "./",
"paths": {
"@/shared/*": [ "../shared/*" ],
},
},
} With the above configuration, i get the following debug output, indicating the failure:
Of note in this debug output is that the After many hours of troubleshooting, we realized that the configuration in the
Hopefully this helps someone. |
thank you @brainthinks that worked for us 🙏 |
@brainthinks did a great job digging into the issue: the @justkey007 Please, take a second look into this, whenever you have a spare time and motivation. Also, good job adding an informative debug system, it really helped. |
Hi,
My problem is that ts-alias never replaces any import because it resolves to an invalid path. All paths resolve to /goui/dist/... instead of /goui/dist...
I have this tsconfig:
Here's the debug output:
Am I doing something wrong or is it a bug?
Thanks!
Best regards,
Merijn
The text was updated successfully, but these errors were encountered: