12b2: Starting LanguageClient with usr/bin/env

Hello! I’ve been trying out my Deno extension with Nova 12b2. It doesn’t work!

Deno Language Server[14:31:24.201000] env: deno: No such file or directory
Deno Language Server[14:31:24.287000] The request was cancelled.

The configuration for starting my extension’s LanguageClient looks like this:

{
	type: "stdio",
	path: "/usr/bin/env",
	args: ["deno", "lsp", "--quiet"],
},

The idea being that Deno may be installed at many possible paths for any given user, and I’d like them not to have to futz about which finding the language server path and putting that into settings.

But calling /usr/bin/env no longer seems to work. Any ideas on why, or another approach I could use? It worked perfectly until now!

1 Like

Yeah, this is definitely a bug and not intentional. We’ll look into a fix for the next beta. Sorry about this!

Just trying to reproduce this myself with a clean environment, things seem to be working alright. I have Deno 2.0.2 installed with Homebrew, and your extension installed, and the LSP starts up fine.

Do you by chance have Deno installed anywhere that isn’t on standard shell paths, but is accessible via env for your shell configuration? I’m trying to track down what might be different between ours.

Interesting. I installed Deno via their shell installer (curl -fsSL https://deno.land/install.sh | sh). If I try to run deno or /usr/bin/env deno anywhere else (e.g. in a local terminal in Nova, or Terminal.app), it works fine.

Hmmm. That also appears to be working for me, at least. Installing Deno that way placed it in ~/.deno/bin/deno, and added . /Users/logan/.deno/env to my .zshrc which exports the right things onto $PATH. Nova seems to see this all just fine at first glance.

Do you happen to know how and where that’s getting set up in your shell configuration? I assume the same way as done by the Deno install script, but I just want to double-check with you.

1 Like

Additionally, you can open Nova’s Tools preferences to see what it sees in the shell environment. If you copy / Command-C the entry for PATH, let me know if the right folder is being seen to access Deno. If it’s not in there, perhaps Nova 12 is not picking up on some shell config aspect I’m not realizing.

1 Like

I uninstalled and reinstalled Deno. It now works. I do not see anything different in my ~/.zshrc after doing this, so I’m still none the wiser. :triumph:

I had just upgraded to Sequoia from Monterey prior to trying this beta out, so I wonder if that had something to do with it.

In any case, thank you for helping me troubleshoot this. Nova 12b2 seems to work with my extension without trouble, so I’m happy!

Ah, okay! If you see any further weirdness, I’m happy to help diagnose!