proto-repl icon indicating copy to clipboard operation
proto-repl copied to clipboard

Can't interact with shadow.cljs because Java cannot find the shadow.cljs.devtools.api/nrepl-select class

Open cbillowes opened this issue 7 years ago • 8 comments

I am using Atom 1.28.1 with the Proto-REPL 1.4.24 package installed with the default settings. I am following a Clojure tutorial by Jacek Schae who uses the following command in video 7 of his course.

(shadow.cljs.devtools.api/nrepl-select :app)

In his video the command works and the REPL connects to Shadow.cljs where he can inspect the state of the application. When I use it, I get an exception ClassNotFoundException shadow.cljs.devtools.api java.net.URLClassLoader.findClass (URLClassLoader.java:x).

shadow cljs

openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-0ubuntu0.18.04.1-b11)
OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)

Let me know what else I can share to help.

cbillowes avatar Jul 13 '18 17:07 cbillowes

same issue

jscruggs avatar Oct 25 '19 17:10 jscruggs

Coud you share which version fo shadow-cljs you are using?

jacekschae avatar Oct 25 '19 18:10 jacekschae

"shadow-cljs": {
  "version": "2.8.52",

jscruggs avatar Oct 25 '19 18:10 jscruggs

I just run this with the version of shadow-cljs that is in the course 2.3.30 and the newest 2.8.67 and it works withouth a problem. The question is why it doesn't work for you?

Could you try restarting atom - quite the whole process - and connect again?

jacekschae avatar Oct 25 '19 18:10 jacekschae

I turned it all off and on again (exited the 'npm run dev' and shut down Atom(1.40.1)) and I got the same error. I bumped the version of shadow-cljs to 2.8.67, restarted everything and still got the error. If it helps I pushed up my local changes to the project to https://github.com/jscruggs/learn-reagent-course-files after editing the .gitignore to stop ignoring package-lock.json so you can see exactly what I'm running. I am using PopOS (a System 76 distro based off of Ubuntu) btw.

jscruggs avatar Oct 25 '19 20:10 jscruggs

Just run your code on my machine and it works

Screen Shot 2019-10-26 at 08 19 47

I assume that when you connect to remote repl you are providing localhost and 3333

Screen Shot 2019-10-26 at 08 21 02

jacekschae avatar Oct 26 '19 06:10 jacekschae

Ah. I finally got it. Because I was working in Linux the key commands you mention in the video didn't apply so I clicked on packages > Proto Repl and picked the closest thing I could find which was either open repl or open repl from project. In retrospect its obvious that I needed to connect to a remote repl (proto-repl:remote-nrepl-connection) but that is only listed in settings > keybindings. Once I chose the correct command and entered the connection info it all worked with no errors.

Thanks so much for your time and effort helping me debug this issue. If I could suggest something, please list the command's name in episode 7 below the video perhaps explaining that just connecting to a repl will not work.

Thanks again. I'm very much enjoying the course.

jscruggs avatar Oct 31 '19 01:10 jscruggs

Great! Very glad to hear that! Just added the note to episode 7!

@cbillowes I hopt this also works for you?

Thanks for your feedback and helping out with resolving this issue. Hope we can close this one and also https://github.com/jacekschae/learn-reagent-course-files/issues/13?

jacekschae avatar Oct 31 '19 05:10 jacekschae