microsoft / typespec

https://typespec.io/
MIT License
4.48k stars 211 forks source link

Better error message when node.exe isn't in path #1153

Closed bterlson closed 19 hours ago

bterlson commented 2 years ago

Sometimes, for reasons, node.exe may not be in a users path. There should be a better error message.

Additionally, allowing users to configure an explicit node path so that they don't need node.exe in their environment would probably be welcome in exotic situations.

timotheeguerin commented 2 years ago

Is there not a way to use vscode node.exe?

nguerrera commented 2 years ago

There is a way. We stopped using it because at one point VS Code node was too old for us.

nguerrera commented 2 years ago

The way is to pass a NodeModule instead of an Executable to the LanguageClient constructor in extension.ts.

mzhongl524 commented 19 hours ago

Can provide better error message , verified