"Go to definition" for methods/computeds does not work in the template - Unable to open '[somefile].vue': resource is not available.
See original GitHub issueInfo
- Platform: Windows 10
- Vetur version: 0.22.6
- VS Code version: 1.39.2
Problem
Running “Go to definition” on a method/computed name inside the template (with vetur.experimental.templateInterpolationService
enabled) throws an error:
Unable to open 'HelloWorld.vue': resource is not available.
I tested this in Veturpack and the default (babel, eslint) Vue CLI 4 project.
More verbose message from Log (Window)
in Output panel:
[2019-10-31 22:17:30.846] [renderer1] [error] resource is not available: Error: resource is not available
at v.createReferencedObject (file:///C:/Users/atagisow/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:4888:687)
at v.createReferencedObject (file:///C:/Users/atagisow/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:4888:652)
at process._tickCallback (internal/process/next_tick.js:68:7)
When the above gif was made:
- Vetur was the only enabled extension
- The contents of settings.json was only
"vetur.experimental.templateInterpolationService": true
Reproducible Case
the gif I uploaded is made on the Vue CLI 4 template, here I’ll show how to reproduce it in Veturpack
- Clone Veturpack
- In VSCode go to
veturpack\client\components\Counter.vue
- Right click
count
on line 8 and press “Go to definition”
You’ll get the Unable to open 'Counter.vue': resource is not available.
error
I’m not sure if what I’m describing is even a feature of Vetur? I’m going by what I’ve read in https://vuejs.github.io/vetur/interpolation.html#generic-language-features -> :
Currently diagnostics, hover, jump to definition and find references are implemented in this way:
So I’m assuming I should be able to do what I’m trying to do.
This issue is different from #707 because it’s related to methods/computeds whereas 707 is related to Go Tos in imports
Issue Analytics
- State:
- Created 4 years ago
- Reactions:28
- Comments:5 (4 by maintainers)
Top GitHub Comments
NVM, should be fixed in #2161.
I am experiencing the same problem with a similar error message and the file at given path definitely exist.