zed
zed copied to clipboard
Vue project LSP not work
Check for existing issues
- [X] Completed
Describe the bug / provide steps to reproduce it
/Users/d1y/Library/Application Support/Zed/extensions/work/vue
Caused by:
No such file or directory (os error 2)
[2024-04-23T06:58:11+08:00 ERROR util] crates/lsp/src/lsp.rs:768: oneshot canceled
[2024-04-23T06:58:11+08:00 ERROR project] failed to start language server "vue-language-server": Request initialize failed with message: Can't find typescript.js or tsserverlibrary.js in node_modules/typescript/lib
[2024-04-23T06:58:11+08:00 ERROR project] server stderr: Some("")
[2024-04-23T06:58:11+08:00 ERROR project] Hit 4 reinstallation attempts for "vue-language-server"
[2024-04-23T06:59:03+08:00 ERROR util] crates/lsp/src/lsp.rs:768: oneshot canceled
[2024-04-23T07:00:57+08:00 ERROR util] crates/terminal_view/src/terminal_view.rs:285: error upgrading view
[2024-04-23T07:01:00+08:00 ERROR util] crates/lsp/src/lsp.rs:768: oneshot canceled
Environment
Zed: v0.132.2 (Zed Preview) OS: macOS 14.4.1 Memory: 16 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.
No response
It happened to me two days ago with Nuxt. I fixed it by installing typescript as a dev dependency of the project.
Same for me, it happened after extracting vue from Zed and moving it to separate package. It is really painful now to work without it.
Same for me, it happened after extracting vue from Zed and moving it to separate package. It is really painful now to work without it.
Please provide your project structure and behavioral. It may not be the same problem I encountered.
FYI: If you have a monorepo project, you can try it https://github.com/zed-industries/zed/issues/9388#issuecomment-2076205428
It happened to me two days ago with Nuxt. I fixed it by installing typescript as a dev dependency of the project.
This fixed my issue! However, on VSCode I didn't need to install typescript. It would be awesome if there was a notification for it or even better, without installing typescript package.
Strangely enough, I now find that it has not taken effect again(this happened after I completely uninstalled zed) Even though I manually installed typescript as a dependency 🤡
Steps
- Create project
bun create vite my-vue-app --template vue
cd my-vue-app
bun i
- Open zed and install vue extension. still not working
https://github.com/zed-industries/zed/assets/45585937/44437579-4fdd-4a3f-989a-13a5424b7a5f
Zed
Zed: v0.135.1 (Zed Preview)
OS: macOS 14.4.1
Memory: 16 GiB
Architecture: aarch64
=====================
But I found out that the official version works @mrnugget
Freshly installed on fedora 40 here, and Vue Language Server wont install/start:
Caused by:
expected value at line 1 column 1
[2024-05-10T09:57:38+02:00 ERROR project] failed to start language server "vue-language-server": Request initialize failed with message: Can't find typescript.js or tsserverlibrary.js in node_modules/typescript/lib
[2024-05-10T09:57:38+02:00 ERROR project] server stderr: Some("")
[2024-05-10T09:57:38+02:00 ERROR util] crates/lsp/src/lsp.rs:768: oneshot canceled
[2024-05-10T09:57:39+02:00 ERROR util] crates/language/src/language_registry.rs:885: server container removal
When I run Zed, it does not install the vue-language-server at all to the languages folder. Typescript, tailwind and ESlint are all installed tho.
I reconfirmed that in fact the official version of zed can work But the preview of zed no longer works.
Zed
Zed: v0.134.4 (Zed)
OS: macOS 14.4.1
Memory: 16 GiB
Architecture: aarch64
Zed Preview
Zed: v0.135.1 (Zed Preview)
OS: macOS 14.4.1
Memory: 16 GiB
Architecture: aarch64
https://github.com/zed-industries/zed/assets/45585937/80f2df71-8ca0-4a06-b99c-9494872785f1
Can repro in Zed v0.135.2 (preview) on Arch Linux x86_64
Just a note:
I know @mrnugget has fixed this issue Thank you very much But the Vue extension has not been updated yet. To make it temporarily useful, please manually add it field in the file
~/Library/Application\ Support/Zed/extensions/installed/vue/extension.toml
[language_servers.vue-language-server]
# Add one line it work
language_ids = { "Vue.js" = "vue" }
It has just been updated: https://github.com/zed-industries/zed/pull/11747
I'm on version 0.136.2 and had previously installed Zed. Vue LSP had suddenly stopped working in my Nuxt project, and can confirm that installing typescript as a dep solved this problem 🙌🏼