Skip to content
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

Cannot resolve dependency -- absolute path treated as external instead of alias #296

Closed
shKwonRiiid opened this issue Nov 1, 2019 · 4 comments
Labels
solution: duplicate This issue or pull request already exists solution: workaround available There is a workaround available for this issue topic: TS Paths Aliases Related to using aliases with TypeScript paths

Comments

@shKwonRiiid
Copy link

shKwonRiiid commented Nov 1, 2019

Current Behavior

In development, cannot resolve any sources like below.

I have no idea why this problem happened. I changed paths in tsconfig

but it didn't work too.

I hope you to help or give me any idea that can solve this problem 🙏 🙇

image

my tsconfig.json

Additional context

Your environment

Software Version(s)
TSDX ^0.11.0
TypeScript ^3.6.4
Browser Chrome 78
npm/Yarn v1.19.1
Node v10.16.3
Operating System macOS Mojave v10.14.6
@swyxio
Copy link
Collaborator

swyxio commented Nov 4, 2019

can you replicate this in a fresh tsdx app and share a reproduction example? seems like messing with the paths may have confused absolute path resolution.

@shKwonRiiid
Copy link
Author

@sw-yx I did some tests like below.

  1. create new tsdx and copy sources => ❌
  2. no folders. I mean flattened all files in src => ❌
  3. absolute path changed to relative path (same source) => ✅

I think absolute path is not working in tsdx 😭

Can you check this?

@arvigeus
Copy link

Have you tried baseUrl: "./src"?

@agilgur5
Copy link
Collaborator

agilgur5 commented Mar 9, 2020

Duplicate of #91

@agilgur5 agilgur5 marked this as a duplicate of #91 Mar 9, 2020
@agilgur5 agilgur5 closed this as completed Mar 9, 2020
@agilgur5 agilgur5 added the solution: duplicate This issue or pull request already exists label Mar 9, 2020
@agilgur5 agilgur5 changed the title Cannot resolve dependency issue Cannot resolve dependency -- absolute path treated as external instead of alias Mar 9, 2020
@agilgur5 agilgur5 added the topic: TS Paths Aliases Related to using aliases with TypeScript paths label Mar 19, 2020
@agilgur5 agilgur5 added the solution: workaround available There is a workaround available for this issue label Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solution: duplicate This issue or pull request already exists solution: workaround available There is a workaround available for this issue topic: TS Paths Aliases Related to using aliases with TypeScript paths
Projects
None yet
Development

No branches or pull requests

4 participants