Hey there! I've been experiencing an issue with my IDE VSCode for the past couple of weeks. Previously, everything was working fine but now I'm facing a peculiar problem.
Whenever I miss an import in VSCode while working on my Angular project, it only happens in a few components but not all of them. When I select 'add missing import' or 'add all missing imports', instead of simply adding it at the top, a new tab opens with the same file and the added imports. What am I doing wrong? As you can see from the split view, the top part still shows a red underline even after clicking 'add all', whereas the bottom part automatically opens a second tab of the same file with the imports.
Please advise me on how to fix this issue.
I have tried reinstalling, removing all extensions, and deleting the configuration but nothing seems to be working.
Thank you!
Edit:
The solution I found was to rename modules to a 'Modules' folder (not sure why) or to rename the component. In this case, the module name was the same as the component name which caused confusion for the IDE.
It seems like a naming issue because now I'm facing a similar problem with a service where when it opens in a second tab, it shows the file name starting with an uppercase letter. Changing the filename to start with an uppercase fixed the problem. Could this be related to some case sensitivity settings with Node.js?