-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'Could not find source file' with Vue plugin when creating new files and using VS Code's file watcher #59349
Comments
I did some investigation and I'm just writing it here to avoid opening a duplicate issue.
No need to answer me, I'm just investigating to see if there's an opportunity to fix it myself, but I don't have enough context to judge the correct fix and I will wait for the fix from TS team. π |
With vscode watchers we are getting the watch notification after the file is opened and thats exposing issue with the plugin. PS: i was investigating this and only saw the above message after pasting my analysis. You are on track and this is issue with the plugin and needs change in plugin. |
@sheetalkamat I'm not sure if there is a way to fix this problem in the Vue TS plugin. The plugin needs to get the latest file code that is not saved to the file system through
If you need to debug tsserver with Vue TS plugin, the setup steps are:
This will start an environment where you can debug the Vue TS plugin and tsserver with breakpoints. |
@johnsoncodehk You dont need to call |
Also note that you would want this to fix correctly in plugin since it is really a timing thing and not a TS issue. The issue will always repro if watch notification is observed after opening the file and that can happen with or without using vscode watchers (though vscode watchers are more likely to get this because they use debouncing more than us) but its still possible. (eg #35794) |
Thanks for the hint, it works great. I think closing #59354 without implementing an alternative fix is ββnot an ideal situation, But anyway volarjs/volar.js#226 is sufficient for our case, please feel free to close this issue. |
This issue has been marked as "External" and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
π Search Terms
π Version & Regression Information
TS 5.4.5+ using a VS Code version with vscode file watcher enabled (1.89+)
β― Playground Link
No response
π» Code
microsoft/vscode#214226 (comment)
.vue
file and add a<script>
block in itπ Actual behavior
Intellisense doesn't work in the new block. You also see a number of request errors for this file:
π Expected behavior
Script block should be treated as code
Additional information about the issue
Also doesn't happen if you set
"typescript.tsserver.experimental.useVsCodeWatcher": false
. However this has been on by default since the April stable release of VS Code (1.89) so it is not a new regressionThe text was updated successfully, but these errors were encountered: