question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] VSCode jump to definition fails

See original GitHub issue
  • I’d be willing to implement a fix

Describe the bug

When using code navigation features in VSCode any class/object that’s in a file which resides in the .yarn/cache area fails to load.

It’s often extremely useful to see the typings or the sources for imported 3rd party code. Or even code of your own from another project.

Unable to open 'environment.d.ts': 
Unable to read file '/<project_root>/.yarn/$$virtual/@ihm-sdk-virtual-0b018953b6/0/cache/@ihm-sdk-npm-8.1.7-3deea91f6a-2.zip/node_modules/@ihm/sdk/tools/environment.d.ts' 
(Error: Unable to resolve non-existing file '/<project_root>/.yarn/$$virtual/@ihm-sdk-virtual-0b018953b6/0/cache/@ihm-sdk-npm-8.1.7-3deea91f6a-2.zip/node_modules/@ihm/sdk/tools/environment.d.ts').

To Reproduce

  1. Setup VSCode according to the instructions on yarnpkg.com
  2. Install dependencies
  3. Use “Jump to Definition” function in VSCode.

Environment if relevant (please complete the following information):

  • OS: [MacOS]
  • Node version [12]
  • Yarn version [2.0.0.0-rc.29]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
danregcommented, Jul 2, 2020

Also does not work in Visual Studio (not vscode) Any ideas? It can’t even find any type definitions from node modules folder because they are not there.

0reactions
merceyzcommented, Jul 25, 2021

Please open a new issue with a reproduction

Read more comments on GitHub >

github_iconTop Results From Across the Web

VSCode "go to definition" not working - Stack Overflow
A simple solution that worked for me is that I closed the current workspace and created a new workspace, added the folders which...
Read more >
Language Server Extension Guide - Visual Studio Code
With Language Servers, you can implement autocomplete, error-checking (diagnostics), jump-to-definition, and many other language features supported in VS ...
Read more >
Go to definition not always working in VS Code
1 Answer 1 · "Refresh SObject Definitions" just silently fails for me - the UI says it's still running but it doesn't seem...
Read more >
VS code. Jump to the function definition - Bug fixed 遺留集
VS code. Jump to the function definition. Install the python plug-in in VSCode. 2. Click function + cltr in the same time can...
Read more >
Visual Studio Code: Use keyboard to jump to first error from ...
When compiling code using the integrated terminal in VS code (not the "Output" or "Debug Console"), it appears to identify anything as a ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found