-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Linked dependencies resolves to file system path #45109
Comments
I have this issue too! Any updates? |
I'm having this issue either. |
There are so many reasons why this doesn’t work, and only one of them is something we can easily fix. I think the easiest way to explain the problems is by explaining how we would generally expect this to work under today’s architecture, and then point out all the reasons why this example code doesn’t work that way. Here’s what should happen, at a high level:
Here are all the reasons why that doesn’t work:
So, this issue is not just a bug, it’s one bug, one or two feature requests, and one or two user config errors wrapped up in one report. I can fix the bug as part of TS 4.4, but (@DanielRosenwasser) it sounds like we need to have a larger discussion around how to be smarter about unconfigured JS projects, or at least how we can nudge the authors of those kinds of projects toward successful configurations. |
@andrewbranch you are right about the user configuration, I will update the example repo with the dependency listed on package.json. Really, how would TS know that it's a dependency if it's only on the node_modules folder. I will look into the points you described, looking into our real use case scenario, and update this issue with what I discover. For last, it really is a change that was made on a recent release from TS and not with VSCode I believe. Because I've set it to use a previous TS version, and the imports worked correctly again. |
What version of TS works? It’s probably working by accident 😬 The other thing to point out is that if you already have another file that imports However, without having a jsconfig.json or tsconfig.json file anywhere in here, a lot of features are going to work very poorly. TS will only be aware of files that are currently open or imported by files that are currently open. In general, your experience will improve a lot if you add jsconfig.json files at the root of each project. That, combined with the config changes I mentioned, along with the bugfix I mentioned in my last bullet point, are enough to fix the issue. |
Does this issue occur when all extensions are disabled?: Yes
Obs: Not related to OS, as other OSs have the same problem
Steps to Reproduce: (A reproducible cenario can be found here)
For example:
The text was updated successfully, but these errors were encountered: