Unable to use "Go To Definition" inside <script> for single file components
See original GitHub issueInfo
- 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’).
- 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)
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>
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:14 (2 by maintainers)
Top GitHub Comments
the same issue. when i ctrl+click
this.someFunc()
i gotI 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.