How do I get WebStorm/TypeScript to 'forget' about other content roots? Follow
I temporarily added another content root to my WebStorm project, and then removed it. The two content roots were the same repo downloaded into separate directories. WebStorm is now quite confused and thinks that files imported are (sometimes) in the other content root.
For instance here
if I command-click on 'log', it takes me to the 'log' file in the other, now detached content root.
Since that now detached content root has a 'log' function (in its 'log' file) that has a different signature than the one I've got in the current content root I get hit with warnings like this
The other content root has a signature that expects 2 arguments, the current one expects 1.
I tried 'invalidate caches' as well as rebooting WebStorm but it persists.
How can I get WebStorm to complete 'forget' about the other content root and see only the files in the current project. My directories are set up correctly
Please sign in to leave a comment.
The answer seems to be: rename the 'removed directory' and then name it back again. WebStorm regained its senses.
>The answer seems to be: rename the 'removed directory' and then name it back again.
restarting Typescript service should be enough, I believe