Fork me on GitHub
#cursive
<
2018-01-22
>
Jakub Holý (HolyJak)13:01:10

Hello! Is there any way to resolve "xyz cannot be resolved" when using a JS library (loaded from a local node_modules)? Code:

(def aws (nodejs/require "aws-sdk"))
(def sts (aws.STS. #js {"apiVersion" "2011-06-15"}))
              ^^^^^^^ aws.STS. cannot be resolved
Thanks!

urzds15:01:18

How do I start a Socket REPL with Cursive? I tried to configure a REPL with "Use clojure.main in normal JVM process" and added the -Dclojure.server.repl JVM argument as described here: https://clojure.org/reference/repl_and_main#_launching_a_socket_server However, that results in Error: Could not find or load main class 5555

Jakub Holý (HolyJak)15:01:34

It looks like your arguments is wrong and the port number is interpreted as a class name. Can u post a screenshot of the configuration?

urzds15:01:04

I already tried to escape the spaces using \ , but that had no effect (apart from the \ being literally included in the command line: The error message changed to ... main class 5555\).

drowsy18:01:23

seems like you need te leave out the quotes completly, and workaround the spaces by replacing them with , (as , is whitespace in clojure but does not separate jvm args)

drowsy18:01:34

-Dclojure.server.repl={:port,5556,:accept,clojure.core.server/repl} looks stupid but works for me

urzds19:01:22

@U44SHEP4N Thanks! I'll try tomorrow. 🙂

urzds19:01:50

Was simple to test. It works.

cfleming01:01:15

Hmm, I see - that’s actually IntelliJ’s JVM args parsing looks like it might be at fault there. Could someone file an issue for this so I don’t forget about it, and I’ll look into it?

cfleming00:01:50

Great, thanks!