Fork me on GitHub

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. (Of course, please tweet and such about the material as well. 😍 )

📺 13

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.


The error didn’t make it trough. 😃

😆 4

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.


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.


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.


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?


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?


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


BTW, Calva is awesome.

calva 6
❤️ 6

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.


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


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


But then my Terminal usage is a bit heavy 🙂

😂 6

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…


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.


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.


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.