Fatal error on startup: Cannot find module Package Storage\LSP-typescript\16.14.0\typescript-language-server\node_modules\typescript-language-server\lib\cli.js
Narretz opened this issue · comments
After updating to 2.1.0, I get the following error:
LSP-typescript: Error: Cannot find module 'C:\Users\marti\AppData\Local\Sublime Text\Package Storage\LSP-typescript\16.14.0\typescript-language-server\node_modules\typescript-language-server\lib\cli.js'
LSP-typescript: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
LSP-typescript: at Function.Module._load (node:internal/modules/cjs/loader:778:27)
LSP-typescript: at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
LSP-typescript: at node:internal/main/run_main_module:17:47 {
LSP-typescript: code: 'MODULE_NOT_FOUND',
LSP-typescript: requireStack: []
I can see that in the folder, there is only a cli.mjs file. So some incompatibility between the language server and my node or typescript version? Kinda weird that this would happen in such a minor update. Or maybe something went wrong during the upate?
LSP-typescript
is the one that controls the path by default and it has been updated to reference cli.mjs
file. So it sounds like you have overwritten the command
.
Default command is: "command": ["${node_bin}", "${server_path}", "--stdio"]
. If you are overriding that on purpose then make sure to use the ${server_path}
variable or just don't override it.
Also make sure that you have restarted ST as not restarting after upgrading packages can result in weird issues.
Hi @rchl thanks for speedy response as usual. I realized I had plugin.py overwritten, and that's where the path is defined.