Home    |    GitHub Page    |    API    |    FAQ

After switching to lerna VS Code complains

I'm rather new to VS Code, since I've long been a Sublime Text user. It seems that I'm not too familiar with using VS Code, thus maybe someone can help me out.

There are 2 major issues I have:

  1. can't find definitions for methods/functions
  2. after the switch to Lerna, I get squiggly lines at imports


In SublimeText I could hover over a function or method and it would show me Definitions and References.
Somehow I don't get that in VS Code. Do I have to install and run something like cscope to get this working?
VS Code gives me a context menu and I can Go to Definition, but this only seems to work within the same file.

Maybe I just don't use how to use VS Code. If anyone can point me in the right direction. I did read the docs, but maybe I missed something essential.


Error messaeg: Cannot find module '@joplin/lib/locale' or its corresponding type declarations.

TypeScript support is not perfect yet in VSCode as far as I can tell. Sometimes I need to close and open a file for it to register the types, and sometimes I need to close the whole app. I didn't look much into the issue yet, but I assume there's a few bug reports about it in their repo and maybe some solution other than closing and opening the app.

Also maybe running npm i from the root again might help.

Consider using webstorm

I don't know what that means. There are just webstorm themes available for VS Code. If you are talking about another editor, the answer is "I'm not interested".

SublimeText creates an index (similar to what cscope does) of the files in the workspace, thus makes it easy to click on a method and jump to its definition/code. I thought that VS Code was smart enough to do the same thing.
Apparently not. Either way, if VS Code can't handle stuff that works in ST, there's no reason to keep using VS Code. It's as simple as that.

I've run npm i several times since the switch to Lerna. I have restarted VS Code a few times. No change in squiggly lines.

I've had the opposite experience. I couldn't get Sublime Text to work properly with TypeScript (I've outlined my issues there) so that's why I now use VSCode, and for me that editor just works.