You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using fish shell with mise. When installing the VSCode extension I immediately receive the following error:
[Error - 12:53:10] TypeSpec client: couldn't create connection to server.
Launching server using command node failed. Error: spawn node ENOENT
[Error - 12:53:10] TypeSpec server executable was not found: 'node' is not found. Make sure either:
- TypeSpec is installed locally at the root of this workspace ("/Users/dev/api-oas") or in a parent directory.
- TypeSpec is installed globally with `npm install -g @typespec/compiler'.
- TypeSpec server path is configured with https://github.com/microsoft/typespec#installing-vs-code-extension.
While opening a terminal (in Fish shell) I can see node and tsp-server correctly resolve
~> which node
/Users/dev/.local/share/mise/installs/node/20/bin/node
~> which tsp-server
/Users/dev/.local/share/mise/installs/node/20/bin/tsp-server
I don't have this issue with any other vs code extension. I did try to set the typespec.tsp-server.path explicitly but it still fails to find node
@JanStevens , I tried to prepare the environment with the steps above but can't repro the issue. From the log, it's because the node can't be found properly, could you help to check whether 'node' can be found from vscode properly? or is there any other special things in your env that may cause vscode can't find 'node'? thanks.
@RodgeFu Hi, I noticed that everything works if you start VSCode with code . in the typespec directory.
When you then close VSCode and open the project from the VSCode menu it does not work anymore. In the terminal view from VSCode node and typespec are always resolved correctly
@JanStevens , do you mean it doesn't work when you start vscode outside shell? could you double check whether you have set the default shell and shims properly? i.e. I can repro the issue when i removed the call to #eval "$(mise activate bash --shims)" in my ~/.profile, which I think is because the mise shims directory is not added to PATH properly, then vscode extension can't find the node. thanks.
Describe the bug
Hi,
I'm using fish shell with mise. When installing the VSCode extension I immediately receive the following error:
While opening a terminal (in Fish shell) I can see node and tsp-server correctly resolve
I don't have this issue with any other vs code extension. I did try to set the
typespec.tsp-server.path
explicitly but it still fails to findnode
Reproduction
mise install node@20
npm i -g @typespec/compiler
Checklist
The text was updated successfully, but these errors were encountered: