## 事象 | 環境 | バージョン | | ---------------------------------------------- | ------- | | [[Neovim]] | 0.10.0 | | [[nvim-lspconfig]] | cf97d24 | | [[Node.js]] | 20.15.0 | | [[@vue language-server\|@vue/language-server]] | 2.0.24 | 以下のエラーになる。 ```error [START][2024-07-04 12:31:29] LSP logging initiated [ERROR][2024-07-04 12:31:29] .../vim/lsp/rpc.lua:770 "rpc" "/home/tadashi-aikawa/.local/share/mise/installs/node/20/bin/vue-language-server" "stderr" "/home/tadashi-aikawa/.local/share/mise/installs/node/20.15.0/lib/node_modules/@vue/language-server/node_modules/@vue/language-core/lib/languageModule.js:63 if (vueCompilerOptions.extensions.some(ext => asFileName(scriptId).endsWith(ext))) { ^ TypeError: asFileName is not a function at /home/tadashi-aikawa/.local/share/mise/installs/node/20.15.0/lib/node_modules/@vue/language-server/node_modules/@vue/language-core/lib/languageModule.js:63:59 at Array.some (<anonymous>) at Object.getLanguageId (/home/tadashi-aikawa/.local/share/mise/installs/node/20.15.0/lib/node_modules/@vue/language-server/node_modules/@vue/language-core/lib/languageModule.js:63:47) at Object.set (/home/tadashi-aikawa/.local/share/mise/installs/node/20.15.0/lib/node_modules/@vue/language-server/node_modules/@volar/language-core/index.js:53:60) at /home/tadashi-aikawa/.local/share/mise/installs/node/20.15.0/lib/node_modules/@vue/language-server/node_modules/@volar/language-server/lib/project/typescriptProjectLs.js:83:30 at Object.get (/home/tadashi-aikawa/.local/share/mise/installs/node/20.15.0/lib/node_modules/@vue/language-server/node_modules/@volar/language-core/index.js:42:17) at Object.getScriptSnapshot (/home/tadashi-aikawa/.local/share/mise/installs/node/20.15.0/lib/node_modules/@vue/language-server/node_modules/@volar/typescript/lib/protocol/createProject.js:216:47) at getOrCreateSourceFileByPath (/home/tadashi-aikawa/tmp/node-hoge/node_modules/typescript/lib/typescript.js:148980:35) at Object.getOrCreateSourceFile (/home/tadashi-aikawa/tmp/node-hoge/node_modules/typescript/lib/typescript.js:148976:14) at /home/tadashi-aikawa/tmp/node-hoge/node_modules/typescript/lib/typescript.js:148902:42 Node.js v20.15.0 " ``` ## 原因 [[@vue language-server|@vue/language-server]]の`2.0.24`にバグがあったから。 <div class="link-card"> <div class="link-card-header"> <img src="https://github.githubassets.com/favicons/favicon.svg" class="link-card-site-icon"/> <span class="link-card-site-name">GitHub</span> </div> <div class="link-card-body"> <div class="link-card-content"> <p class="link-card-title">Neovim Volar LSP broken for 2.0.7 · Issue #4159 · vuejs/language-tools</p> <p class="link-card-description">Hi, I just noticed that when I open any of my projects new or old I don't have any TS/JS/Vue completions e ... </p> </div> <img src="https://opengraph.githubassets.com/689b628175f4d4d89d59a2ad4d6bb875289c0e3affa469c2c8a2ec214950ef2c/vuejs/language-tools/issues/4159" class="link-card-image" /> </div> <a href="https://github.com/vuejs/language-tools/issues/4159"></a> </div> ## 解決方法 [[@vue language-server|@vue/language-server]]のバージョンを`2.0.26-alphat.2`にする。 ```console npm i -g @vue/[email protected] ```