Fork me on GitHub
#shadow-cljs
<
2019-05-28
>
Ahmed Hassan09:05:51

Do I need to include thheller/shadow-cljs {:mvn/version "2.8.37"} in deps.edn file when using shadow-cljs with Clojure Deps and CLI? I am using npx shadow-cljs watch main command for compilation.

thheller09:05:20

yes, that is recommended

thheller09:05:35

it isn't strictly required since it will inject itself but for other tooling purposes it is better if you include it manually

Ahmed Hassan09:05:51

When I include it. Following error is thrown on requiring the namespace in clj shell `Syntax error (FileNotFoundException) compiling at (cookies.clj:1:1). Could not locate clj_time/core__init.class, clj_time/core.clj or clj_time/core.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.`

thheller09:05:58

I wish I never added the auto-inject 😕

thheller09:05:35

hmm that looks like it might be a dependency conflict?

thheller09:05:04

shadow-cljs has the dependency on ring-core but excludes clj-time

thheller09:05:06

[ring/ring-core "1.7.1"
    :exclusions
    ;; used by cookie middleware which we don't use
    [clj-time]]

thheller09:05:45

like like maybe that exclusion is added to your ring dep?

thheller09:05:50

might be a bug in tools.deps?

Ahmed Hassan09:05:39

I'm using Pedestal, not Ring for server.

thheller09:05:05

pedestal uses some ring middlewares IIRC?

thheller09:05:17

something is loading the cookies.clj which is probably from ring

thheller09:05:06

check clj -Stree

thheller09:05:55

in case you aren't already doing this I would recommend putting all CLJS related deps (including shadow-cljs) into a dedicated :cljs (or so) alias

Ahmed Hassan09:05:16

I have put it in :dev alias. with CLJS and binaryage/devtools.

thheller09:05:33

@ahmed1hsn I just tested and it seems to be a bug in tools.deps. you can "fix" it for now by simply including the clj-time dep manually

✔️ 4
hlolli17:05:51

I'm building on windows, and constantly hit with a missing node-module readable-stream/writeable.js. Someone had this before?

hlolli17:05:24

I'm in an emulator so I can't copy paste, but it's being called from stream-browserify, which is from node-libs browser, which is required by shadow-clj

hlolli17:05:20

nevermind, I need my glasses, mix up the plural readable-streams to singular readable-stream