sublimelsp / LSP-typescript

TypeScript, JavaScript support for Sublime LSP plugin
MIT License
132 stars 11 forks source link

LSP-typescript reports 'No such file or directory' on Log Panel #153

Closed mikanmi closed 2 years ago

mikanmi commented 2 years ago

Hello LSP-typescript,

LSP-typescript reports "No such file or directory" on Log Panel of Sublime Text.

I want to solve the LSP-typescript's "No such file or directory." I assigned '/usr/local/bin/npm' to npmLocation on the LSP-typescript settings as the following. But, LSP-typescript still reports "No such file or directory" on the Log Panel.

Log Panel:

LSP-eslint: ESLint server running in node v18.4.0
LSP-typescript: [tsserver] /bin/sh: /usr/local/Cellar/node/18.4.0/bin/npm: No such file or directory

npm path:

% which npm
/usr/local/bin/npm

LSP-typescript settings:

"npmLocation": "/usr/local/bin/npm",
rchl commented 2 years ago

The settings you specify have to follow the same structure as the defaults you see on the left when opening LSP-typescript settings. npmLocation needs to be nested inside initializationOptions.

mikanmi commented 2 years ago

Thanks, @rchl.

I solved it. LSP-typescript now reports "using npm from /usr/local/bin/npm."