-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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
Project references are not picked up (1) #80423
Comments
@OliverJAsh did you run a (I also find that after doing a build from the command line, sometimes I still need to restart TS Server to see the results in VS Code.) |
I did all of those things, unfortunately to no avail. I even checked the TS server log to see if I could spot anything particularly odd, also to no avail. |
@OliverJAsh hold on, |
|
The more I play with project references, the more it seems like they simply don't work with VS Code. Here's a similar but separate issue I just filed: #80438. |
@OliverJAsh In your example, In Closing this as a configuration question. microsoft/TypeScript#33094 would let you specify other config file names instead of |
Correct, but |
Good point. I was having trouble understanding what the intention was in the example. This looks like another case of microsoft/TypeScript#30823 then. If you don't think this is the case, please open a new issue against TypeScript |
Steps to Reproduce:
./tsconfig-src.json
:./tsconfig.json
:./src/main.ts
:./src/helpers/functions.ts
:When I run
tsc --build
, it builds with no errors.When I navigate to a TS file in VS Code, e.g.
./src/main.ts
, I get errors:Cannot find module 'helpers/functions'
I expected this to work because VS Code would find the
./tsconfig.json
in the parent/root directory, and this references./tsconfig-src.json
(the TS project which includes the file I'm looking at:./src/main.ts
).Repo including the above test case: https://github.com/OliverJAsh/unsplash-ts-project-references
I understand I could workaround this by moving
./tsconfig-src.json
into the./src/
folder at./src/tsconfig.json
, but I believe that shouldn't be necessary.What's more, in my real world application the
./tsconfig-src.json
includes files in multiple root folders (./src/
,./client/
,./server/
), not just./src/
, so this workaround wouldn't help in that case. For an example, see https://github.com/OliverJAsh/unsplash-ts-project-references/tree/bad-workaround.Does this issue occur when all extensions are disabled?: Yes
Potentially related:
The text was updated successfully, but these errors were encountered: