2

I am trying to evaluate some Clojure forms in VS Code using the Calva REPL.

When I run any of these commands, I get the error:

No application has connected to the REPL server. Make sure your JS environment has loaded your compiled ClojureScript code.

It doesn't seem to let me switch namespaces.

enter image description here

halfer
  • 19,824
  • 17
  • 99
  • 186
Mr. Robot
  • 1,334
  • 6
  • 27
  • 79

1 Answers1

0

By the comments to the question I am assuming this is a browser project. And by the error message, that it is shadow-cljs.

With shadow-cljs Calva opens up the REPL window a bit prematurely, because we still lack a reliable way to ensure the connection to the ClojureScript application. Once you have the prompt, like you have there (embarrassingly undefined), try reloading the web page with the application. You should be able to evaluate something then, and the prompt should get something less undefined.

I can recommend joining the #calva channel on the Clojurians Slack, for faster help.

PEZ
  • 16,821
  • 7
  • 45
  • 66
  • I may be facing a similar issue but with a node project. Is there a way to fix this in my case or does it fall down to the same issue you're describing? Happy to make a separate post with detailed information if you prefer. – customcommander Sep 21 '19 at 08:27
  • Calva itself is built partly as a shadow-cljs node project so there is hope! But, yes, a separate question with some more details would help.Some node projects won't allow an app-connected REPL, because they don't have a main entry point, but let's see what your details are first. Cheers! – PEZ Sep 22 '19 at 15:04
  • Thanks. Good that you got it sorted out. Basically it is what I am trying to say with my answer here. The app needs to run. – PEZ Sep 26 '19 at 13:48