I created a new project with https://github.com/seancorfield/clj-new and when trying to jack in I got this:
Command 'Calva: Start a Project REPL and Connect (aka Jack-In)' resulted in an error (Error: EACCES: permission denied, mkdir '/.calva')
Seems like it's trying to create the .calva dir on the root dir, instead of on the project dir.
I was opening the project dir with code . and then immediately calling the jack-in command, but now I realize I first had to open a file within the project.
Closing this.
Actually you shouldn't have to open a file in the project. I'm reopening, so that we keep this on our radar, and so that people find your workaround. Thanks for reporting!
I cannot reproduce this =(. When I open a project and jack-in with no file open, it works as usual. I tried creating a new clj-new project as well.
I have the same issue. Not a big problem though, there's a simple work-around around this.
Steps to reproduce:
lein new foo
cd foo
code .
press ctrl+alt+c, ctrl+alt+j => doesn't work, throws `Error: EACCES: permission denied, mkdir '/.calva'`
(click on TERMINAL tab, terminal opens)
press ctrl+alt+c, ctrl+alt+j => works now
VS Code version: 1.48.2
Calva 2.0.122
Thanks for the workaround, @brdloush ! Very interesting. Which OS are you on?
Update: sorry, using different github user on my phone.
I'm using Ubuntu budgie 20.04.
Originally I thought I have to run at least lein deps in the terminal. Later I found out that opening the terminal is all that is needed.
The error message shown is strange: as if it was trying to actually create the '/.calva'` folder in filesystem root. I may check later using strace or something.
Yikes, @diegovdc and I thought we fixed this on his machine, but I think the original fix may have been reverted.
It has to do with this line, but really the code above that gets the output directory. Maybe @diegovdc can look at it again, if he can still reproduce on his machine.
@brdloush Can you try this vsix and see if the issue is fixed for you? @diegovdc changed something that may work, and seems to work for him. https://7915-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.124-pull-770-21d6640a.vsix
You can hit ctrl+shift+p and search vsix to find and run the command for installing it.
@bpringe The vsix is working for me.
I can confirm. That vsix version fixes mentioned isssue. I can jack-in to freshly created project without having to open terminal. :+1: :clap:
Awesome! Great job @diegovdc :tada:
Most helpful comment
I have the same issue. Not a big problem though, there's a simple work-around around this.
Steps to reproduce:
VS Code version: 1.48.2
Calva 2.0.122