Fork me on GitHub
#calva
<
2021-03-19
>
pez09:03:56

Dear friends of Calva. Please consider subscribing to the CalvaTV channel on YouTube, and also like and comment a bit on the material. Hopefully that can make it a bit more visible there. https://www.youtube.com/calvatv (Of course, please tweet and such about the material as well. 😍 )

📺 13
wevrem13:03:49

I need help. I’ve been using Calva for a while, and I’m wondering if something is out of date or some dependency mismatch. Whenever I open or create a new project, I try to Jack-in and get this error: clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version,"0.8.3"},cider/cider-nrepl {:mvn/version,"0.25.8"}}}' -A:test /bin/sh: clojure: command not found Jack-in process exited. Status: 127 I’m on mac, Big Sur, both Calva and VS Code are up to date (I’m pretty sure). What am I doing wrong? To fix this I have to quit VS Code and re-open my project, and that usually works, but sometimes not, and I can’t seem to have two projects going at the same time.

pez13:03:27

The error didn’t make it trough. 😃

😆 4
wevrem13:03:02

I am still learning the Slack editor and how to hit return to add lines instead of submit the message. I think I got it.

pez14:03:02

I think you are running into the common problem that VS Code is not started with an environment that has the Clojure stuff available. Try starting VS Code from a terminal where you know you have clojure on the path.

wevrem14:03:32

okay, that definitely worked. I had made myself an automator script so that I could right-click on a folder and open it in VS Code, and then sort of forgot that I had created that helper tool. I bet there is something with that tool that is not picking up the path/environment correctly. I’ll go investigate. Thanks for the help.

wevrem14:03:57

Question: When I’m in a “problem” project, and jack-in is saying it can’t find clojure command, I can still open a terminal (in the project), start nrepl (using the same options that jack-in would use, copied directly from the error message above, for example) and then use Calva’s ‘connect to running REPL server in the project’ and that works okay. I don’t understand enough to know why of these two terminals within the VS Code project, one of them can’t find the clojure command and let me jack in, but the other will let me manually start repl. Do you know what is going on? It’s probably a VS Code thing more than a Calva thing?

pez15:03:59

Not sure actually. At first I thought it was the same problem I have, that VS Code, when started from the MacOS Finder does not get the right environment. But now you tell me that from a terminal in the project the command works. Is that from a terminal, in the project, in VS Code? Or is it from a terminal outside VS Code?

wevrem16:03:12

On my last comment, I was talking about terminals within the project itself. VS Code built-in terminals.

wevrem16:03:14

BTW, Calva is awesome.

calva 6
❤️ 6
seancorfield16:03:39

The Terminal opened inside VS Code is going to start up using your regular .profile and other dot-files, so the path will be correct, and clojure will be accessible.

seancorfield16:03:11

macOS has always been a bit of a pain in regards to processes started from the Finder.

seancorfield16:03:40

I always start VS Code from the Terminal via the code command to avoid any of that…

seancorfield16:03:56

But then my Terminal usage is a bit heavy 🙂

😂 6
wevrem17:03:25

Sean, I attended the Provo meetup a few months ago and remember your terminal use was a bit out of control. Don’t know how you keep track of it all…

pez17:03:47

I also always start VS Code from the terminal. I think it is super strange that you can use the jack-in command from a VS Code terminal but that jack-in fails with that message. I have never seen that before. Jack-in shares the environment with VS Code, as I was sure the VS Code terminals also did.

wevrem17:03:47

I’ll try and get in the habit of using the code from the command line, and as a backup, for when I forget to do that, I think I can manually start the REPL and then connect to it with Calva.

pez17:03:34

There is a command for copying the jack-in command to the clipboard. But still, super strange all this. Can you file an issue report from VS Code’s Help menu? It will attach some system info to the report that might shed some light on the mystery.