Fork me on GitHub
#leiningen
<
2020-08-17
>
Mark Gerard13:08:31

Hey, I am getting a strange coercion error when i run lein trampoline cljsbuild repl-rhino:

java.lang.IllegalArgumentException: No implementation of method: :as-file of protocol: #' found for class: java.lang.Character

Mark Gerard13:08:52

I thought googling this would turn up some answers but I have not been very successful, any pointers greatly appreciate

noisesmith13:08:45

@cattabanks do you have a full stack trace? sounds like something wanted ["/path/to/a/file"] and got "/path/to/a/file" - so when it seqs on its input it gets characters instead of strings, and characters can't be mapped to files

noisesmith13:08:35

so this is happening in the prep-tasks of cljsbuild, I'd look for file strings that are not inside vectors in your config, as a first stab at this

Mark Gerard13:08:39

Put all strings in vectors, now getting this: Syntax error (FileNotFoundException) compiling at (cljsbuild/repl/rhino.clj:1:1).

Mark Gerard13:08:13

Am I expected to install rhino separately?

noisesmith14:08:38

I'd expect it to be a dep

Mark Gerard14:08:59

I am still stamped, here is my project.clj: https://pastebin.com/XrKBKkkb

noisesmith14:08:56

cljs removed rhino (I think I recall this being an intentional decision) https://cljs.github.io/api/cljs.repl.rhino/-main - this shows the first cljs version that has the rhino ns, and the first that doesn't

noisesmith14:08:13

it's worth asking for more info on #clojurescript but I think the best bet is to pick a different js runtime (eg. node...)

👍 3
noisesmith14:08:13

it's worth asking for more info on #clojurescript but I think the best bet is to pick a different js runtime (eg. node...)

👍 3
Mark Gerard19:08:22

The other alternative was to downgrade to a version with rhino