Error in Nvim with TS related LSPs.
Whenever I try to use my LSP in a TS/JS related environment it can seem to find any of the files to run like tsserver, tailwindcss language server, prettierd, eslint_d. They all throw errors about file not found.
The path in question exists. Photo attatched
Anyone got any ideas?
[ERROR][2024-05-29 11:36:05] .../vim/lsp/rpc.lua:770 "rpc" "/home/ziim/.local/share/nvim/mason/bin/typescript-language-server" "stderr" "node:internal/modules/cjs/loader:1148\n throw err;\n ^\n\nError: Cannot find module '/home/ziim/.local/share/nvim/mason/typescript-language-server/lib/cli.mjs'\n at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)\n at Module._load (node:internal/modules/cjs/loader:986:27)\n at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)\n at node:internal/main/run_main_module:28:49 {\n code: 'MODULE_NOT_FOUND',\n requireStack: []\n}\n\nNode.js v20.13.1\n"
[ERROR][2024-05-29 11:36:05] .../vim/lsp/rpc.lua:770 "rpc" "/home/ziim/.local/share/nvim/mason/bin/tailwindcss-language-server" "stderr" "node:internal/modules/cjs/loader:1148\n throw err;\n ^\n\nError: Cannot find module '/home/ziim/.local/share/nvim/mason/@tailwindcss/language-server/bin/tailwindcss-language-server'\n at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)\n at Module._load (node:internal/modules/cjs/loader:986:27)\n at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)\n at node:internal/main/run_main_module:28:49 {\n code: 'MODULE_NOT_FOUND',\n requireStack: []\n}\n\nNode.js v20.13.1\n"
[ERROR][2024-05-29 11:36:05] .../vim/lsp/rpc.lua:770 "rpc" "/home/ziim/.local/share/nvim/mason/bin/typescript-language-server" "stderr" "node:internal/modules/cjs/loader:1148\n throw err;\n ^\n\nError: Cannot find module '/home/ziim/.local/share/nvim/mason/typescript-language-server/lib/cli.mjs'\n at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)\n at Module._load (node:internal/modules/cjs/loader:986:27)\n at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)\n at node:internal/main/run_main_module:28:49 {\n code: 'MODULE_NOT_FOUND',\n requireStack: []\n}\n\nNode.js v20.13.1\n"
[ERROR][2024-05-29 11:36:05] .../vim/lsp/rpc.lua:770 "rpc" "/home/ziim/.local/share/nvim/mason/bin/tailwindcss-language-server" "stderr" "node:internal/modules/cjs/loader:1148\n throw err;\n ^\n\nError: Cannot find module '/home/ziim/.local/share/nvim/mason/@tailwindcss/language-server/bin/tailwindcss-language-server'\n at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)\n at Module._load (node:internal/modules/cjs/loader:986:27)\n at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)\n at node:internal/main/run_main_module:28:49 {\n code: 'MODULE_NOT_FOUND',\n requireStack: []\n}\n\nNode.js v20.13.1\n"
1 Reply
brew install typescript-language-server