Fork me on GitHub
#beginners
<
2017-07-30
>
vinai15:07:04

Trying fo follow the lambdaisland Tutorial https://lambdaisland.com/episodes/react-app-clojurescript Hitting a blocker right at the beginning. I've ran:

lein new chestnut calculator -- --vanilla
Then I've added the following dependencies:
[cljsjs/react "15.1.0-0"]
[cljsjs/react-dom "15.1.0-0"]
And finally I've run the command lein figwheel. It spits out a stacktrace though that it can't load ring/core/protocols.clj from the classpath. According to github that file exists in ring 1.6.1 and 1.6.2 (tried both). What am I missing? The exact error is
Caused by: java.io.FileNotFoundException: Could not locate ring/core/protocols__init.class or ring/core/protocols.clj on classpath., compiling:(ring/util/servlet.clj:1:1)

plexus15:07:57

Hi @vinai, it seems this is a problem with the current Chestnut. To work around it, you can start a lein repl, then start Figwheel with (go)

Sam H15:07:05

@vinai Upgrading the figwheel versions to 0.5.11 seems to work

vinai16:07:02

Thank you both! Currently in a train but will pick this up again in an hour.

plexus16:07:51

I can confirm that the Figwheel update fixes it. This is already on Chestnut master. I'll try to cut a new Chestnut version today with some other version upgrades as well.

plexus16:07:31

Chestnut v0.15.2 is out which should fix this problem. Thanks for letting me know @vinai!

vinai16:07:28

Thanks for the awesome response time!

vinai17:07:48

How can I get lein to pull in a new version of chestnut?

vinai17:07:34

When I run lein new chestnut it still seems to create the project based on the 0.15.1 template.

dpsutton17:07:57

the tempate hasn't been updated. try just changing the project.clj file to point to .0.15.2 now

vinai17:07:25

chestnut isn't listed in the project.clj

vinai17:07:53

Problem is, I updated the figwheel dependency to 0.5.11 and ran lein deps but am still getting Could not locate ring/core/protocols__init.class or ring/core/protocols.clj on classpath., compiling:(ring/util/servlet.clj:1:1)

vinai17:07:29

Scratched the project now and would like to build a new one based on chestnut 0.15.2

vinai17:07:51

So I'm wondering how to do that.

noisesmith17:07:24

if there's no template, the best idea is to explicitly require the updated lib version, even if it was implicit before

noisesmith17:07:44

in fact, this would even be a better plan if there was a new template version, it's less work

noisesmith17:07:18

if you look at lein deps :tree you'll see where chestnut comes in, your dep should be specified before the thing that currently pulls it in

vinai18:07:19

Nope, lein deps :tree|grep chestnut - no hit

vinai18:07:43

I'll try to add it, but currently it isn't pulled in at all into the project.

vinai18:07:05

Okay, if I not only update figwheel to 0.5.11 but also figwheel-sidecar and lein-figwheel, then the error goes away and I can start figwheel.

vinai18:07:18

Thanks for chiming in never the less noisesmith!

vinai18:07:51

Appreciate being able to talk to someone even though it's Sunday.

plexus18:07:47

Since chestnut is a template you can't just upgrade an existing project. You can try generating a new project in a different directory and then copy over project.clj

vinai18:07:27

Yeah, I tried that, but lein wasn't updating to the new release you made.