-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Newly created files don't belong to ts-project #36532
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
Comments
@BetterCallSKY I looked into the log you shared but I don't see any event in directory watching to show that the new file is created on disk before or after it is opened in the editor around
Is the file on the disk? What are content of your config file.. If you do not want to share log/details here publicly, you can email it to me at |
I believe I'm experiencing this same issue. I've tried multiple versions of I created a file called The moment I import it from another file that's listed in a project that's not from
Once it's part of the correct project, my autocomplete and type checks work. Thanks for your hard work on this wonderful piece of software. |
@alexfaber2011 The behavior you mentioned seems correct since the root files in your project are just two https://gist.github.com/alexfaber2011/b451d3c9ac92292e70b0f3ccc7888b8e#file-tsserver-log-L21 |
Very helpful, thanks @sheetalkamat. My |
@sheetalkamat The new file is 'kpi-form.tsx`. When I rename it to 'kpi-form2.tsx' -> 'kpi-form.tsx', then autocomplete starts working correctly. |
This is still a problem for me with VS Code 1.42.1 and Typescript 3.5.3. Somewhere I read a suggested workaround to configure the Code workspace with a local typescript installation instead of the system version. I don't recall whether that used to fix the issue for me, but it isn't fixing it now. |
@lstkz Your log isn't complete so I cant tell whats going on, whether the file is present on the disk or not. I cant also tell if the config file is including that file as part of file names through files/include.. We would need complete log as well as repro steps to investigate this further. |
We appear to be running into a similar issue on TypeScript 3.9.3. Pre-existing files belong to the correct project, but newly created files belong to |
I was able to create a repro here: https://github.com/brieb/ts-inferredProject1 Thank you very much for looking into this! |
Continuation of #35794.
I am able to reproduce it in 3.8.0-dev.20200128.
tsserver.log. Downloaded::
(please remove it from this post, after you download it)
An important part of the log is:
All the above files are from 'node_modules', and there is only a single project file
MyComponent.tsx
, which is a newly created file (by ctrl+c, ctrl+v).TypeScript Version: 3.8.0-dev.20200128
Expected behavior:
The newly created file should belong to the same project.
Actual behavior:
The newly created file doesn't belong to the same project, and autocomplete is broken.
Related Issues:
#35794
The text was updated successfully, but these errors were encountered: