Fork me on GitHub

I'm getting this error on an existing project I am revisiting and not sure where to start on fixing it.

cp: cannot stat 'PREFIX/example-deps.edn': No such file or directory


I've changed machines and thus downloaded new version of shadow etc


Seems to be related to using the :deps config option


nvm this seems to be a clj on linux issue as I can't even run clj repl

Mark Addleman23:01:45

I would like to develop my server-side code in the same JVM as is delivering the HTML and javascript in order to avoid CORS issues. Ideally, I would start shadow-cljs and then connect to the nREPL server from Cursive and be off to the races. I couldn't find reference to this workflow in the shadow-cljs docs but I could have easily missed something.


@mark340 so you have a Clojure service?

Mark Addleman23:01:26

Yes. The browser and the server communicate using sente


so your Clojure service should serve up your index.html and JS file

Mark Addleman00:01:55

It will do that in production. During development, I'd like shadow-cljs to serve them up to get the benefits of live reloading.

Mark Addleman00:01:22

Unless there is a method for getting shadow's live-reloading through my Clojure service


live-reloading is handled through the JS code that is generated by shadow-cljs


shadow-cljs' HTTP server is only a helper for people who are developing against some external service

Mark Addleman00:01:34

Oh, interesting. Is there some example of manually loading the necessary JS code?


? what do you mean?


you put the generated JS script on the page

Mark Addleman00:01:17

I think I'm very confused 🙂 In my current workflow, I have some cljs source and an index.html file. shadow-cljs serves the index html and my compiled cljs. There must be some additional JS that shadow-cljs injects in order to manage live reloading. Is that correct?


your index.html should be including a JS file, correct?


e.g. js/main.js. that JS is generated by shadow-cljs. it is your CLJS app's code


shadow-cljs, when in development mode, adds to your compiled code the stuff required for hot-reloading


so you only ever need to load the one JS bundle, in this case js/main.js

Mark Addleman00:01:18

> shadow-cljs, when in development mode, adds to your compiled code the stuff required for hot-reloading

Mark Addleman00:01:25

This is the piece I was missing

Mark Addleman00:01:31

I had assumed it was a separate JS file


@mark340 there's also a way to run JVM server code within the JVM server that shadow-cljs starts. There's info in the manual about that.

👍 5