Fork me on GitHub
#portal
<
2023-01-19
>
Travis15:01:35

Hello I am starting to take a look at using portal. Currently I am running my repl outside of vscode and connecting to it. When I run

portal.api.open { :vs-code :launcher } 
I get an error where it cannot find the vs-code.edn file. I do have the vscode portal plugin installed. What might I be missing?

Travis16:01:20

yeah, i saw that but i have the vscode portal plugin installed

djblue16:01:03

What folder is vscode running in relative to the clojure repl process?

Travis16:01:48

good question, I launched code from a term but i can't recall what folder i was in at the time since I just have a workspace in vscode. Repl is launced in the actual project folder

djblue16:01:30

I think if you open vscode at the root of the project, you might have better luck

Travis16:01:08

going to try it now

Travis16:01:49

did not work. There is .portal folder but nothing in it

djblue16:01:07

Any errors you can find in the output window for extension hosts?

Travis16:01:09

i don't see any

Travis16:01:29

just

No config file found: vs-code.edn
inthe calva ouput window

djblue16:01:38

https://github.com/djblue/portal/blob/master/src/portal/extensions/vs_code.cljs#L122-L129 is the code responsible for setting everything up, not sure why there is nothing in the .portal folder :thinking_face:

djblue16:01:34

Maybe delete the .portal directory and relaunch vscode?

Travis16:01:55

will give it a try

Travis16:01:41

so same result but i did see a error popup on vscode "terminal process failed to launch .portal does not exist"

djblue16:01:13

Weird, any other details you can provide about your setup?

Travis17:01:56

not sure what else. On latest versions, Fedora Linux OS. Launching the repl from a terminal and connecting to it via calva

👍 2
Travis17:01:25

im sure its probably something dumb i might be doing, lol

djblue17:01:02

I can test on linux when I get some time later, last I checked it worked but it doesn't hurt to try 👌

cjmurphy12:02:33

> There is .portal folder but nothing in it That's the problem. There needs to be a vs-code.edn file in the .portal directory. For some reason the 'vscode portal plugin/extension' did not write the file. As a workaround you could always put it in manually, with this contents (port is randomly generated):

{:host "localhost", :port 34771}
I'm also on Linux (pop!_os) and I think have noticed a similar problem. But it fixed itself: I uninstalled the extension then pressed the 'Restart Required' (or similar wording) button then found the extension again and then installed it again. By fixed I meant the folder and the file both appeared.