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.

Unable to use "Go To Definition" inside <script> for single file components

See original GitHub issue
  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: macOS
  • Vetur version: 0.24.0
  • VS Code version:

Version: 1.44.2 Commit: ff915844119ce9485abfe8aa9076ec76b5300ddd Date: 2020-04-16T17:07:18.473Z Electron: 7.1.11 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Darwin x64 19.4.0

Problem

  • I’m unable to use “Go to Definition” on one of vue methods (example: inside the mounted())

  • VS Code Notification

Unable to open ‘vue-editor-bridge.ts’: Unable to read file ‘/vue-temp/vue-editor-bridge.ts’ (Error: Unable to resolve non-existing file ‘/vue-temp/vue-editor-bridge.ts’). image

  • Log (Window) output

[2020-04-25 22:30:57.576] [renderer1] [error] Unable to read file ‘/vue-temp/vue-editor-bridge.ts’ (Error: Unable to resolve non-existing file ‘/vue-temp/vue-editor-bridge.ts’): Error: Unable to read file ‘/vue-temp/vue-editor-bridge.ts’ (Error: Unable to resolve non-existing file ‘/vue-temp/vue-editor-bridge.ts’) at e.doReadAsFileStream (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1635:7) image

Reproducible Case

Sample Code, then use “Go to Definition” on the this.fetchDatabase() under mounted()

<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
export default {
  mounted() {
    this.fetchDatabase()
  },
  methods: {
    fetchDatabase() {
      console.log('action here')
    }
  },
}
</script>

ezgifcom-video-to-gif

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
dtboy1995commented, Oct 24, 2020

the same issue. when i ctrl+click this.someFunc() i got

Unable to open 'vue-editor-bridge.ts': Unable to read file '\vue-temp\vue-editor-bridge.ts' (Error: Unable to resolve non-existing file '\vue-temp\vue-editor-bridge.ts').
1reaction
ndunn219commented, Oct 25, 2020

I get the same when I control-click this.someFunc(). It gives me the option to create the file. I tried that and it creates the file in C:\vue-temp\vue-editor-brige.ts. Then the next ctrl+click opens that file, which is empty.

vue-editor-bridge

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to use "Go To Definition" inside <script> for single file ...
Unable to use "Go To Definition" inside.
Read more >
Go To definition does not work in same file with VSCODE + ...
My vue.js configuration is. vue.js 2.0; use vue.cli; webpack; javascript not ...
Read more >
Creating our first Vue component - Learn web development
For this component, we'll use the object registration method. Go back to your ToDoItem.vue file. Add a props property inside the export default ......
Read more >
Modules, introduction - The Modern JavaScript Tutorial
If you try to open a web-page locally, via file:// protocol, you'll find that import/export directives don't work. Use a local web-server, such ......
Read more >
API - esbuild
If no input files are provided then a single input file is read from stdin. The build API can take the following options:...
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