Find usages not working across typescript modules in yarn workspaces

I'm using Intellj Idea Ultimate 2018,3.2 and I'm having trouble getting Find Usages and refactor to work across modules. I have set up an example yarn workspaces project containing a few typescript modules. If I do Find Usages or refactorings such as rename, I only get usages in the declaring module. Go To Declaration works correctly across modules.

example project: https://github.com/asammartin/workspaces-example

issue: https://youtrack.jetbrains.com/issue/IDEA-205173

1 comment

JavaScript/Typescript usages are not found accross IDEA modules boundaries - this is expected... Each IDEA module is isolated, and files from different modules are not visible unless explicitly added to module dependencies.

However your setup doesn't work when using a single module as well... Seems that Typescript language service (tsserver) can't correctly handle this configuration (lerna+yarn workspaces+Typescript 3.0 project references), as I can see similar errors/issues when opening your project in the most recent VSCode version (no completion/usages navigation, Tsserver errors on imports):

0

Please sign in to leave a comment.