Fork me on GitHub
#shadow-cljs
<
2022-08-28
>
Klay19:08:26

Hello. I’m trying to integrate Datalevin into a Fulcro app and keep getting a compilation error when requiring it. My shadow-cljs.edn:

{:source-paths ["src/main" "resources"]
 :dependencies [[com.fulcrologic/fulcro "3.5.24"]
                [com.fulcrologic/fulcro-rad "1.2.7"]
                [com.wsscode/pathom "2.4.0"]
                [datalevin "0.6.16"] ; <---
                [mount "0.1.16"]
                [ring/ring-core "1.9.5"]
                [ring/ring-jetty-adapter "1.9.5"]]
 :jvm-opts ["--add-opens=java.base/java.nio=ALL-UNNAMED"
            "--add-opens=java.base/sun.nio.ch=ALL-UNNAMED"] ; <---
 :dev-http {8000 "resources/public"}
 :builds {:app {:target :browser
                :output-dir "resources/public/assets/app/js/compiled"
                :asset-path "/assets/app/js/compiled"
                :modules {:main {:init-fn com.kyleerhabor.hue.client/init
                                 :entries [com.kyleerhabor.hue.client]}}
                :devtools {:after-load com.kyleerhabor.hue.client/refresh
                           :preloads [com.fulcrologic.fulcro.inspect.preload
                                      com.fulcrologic.fulcro.inspect.dom-picker-preload]}}}}
The file (`src/main/com/kyleerhabor/hue/db.clj`):
(ns com.kyleerhabor.hue.db
  (:require [datalevin.core :as d]))
The error:
; Evaluating file: db.clj
; Syntax error compiling at (taoensso/nippy/crypto.clj:14:79).
; No such var: enc/secure-rng
; Evaluation of file db.clj failed: class clojure.lang.Compiler$CompilerException
I’m able to compile my server.clj file just fine, which makes this confusing.

thheller20:08:56

this just doesn't seem to support CLJS at all?

thheller20:08:15

I mean just the jvm opts alone suggest this is meant for CLJ only

Klay20:08:06

Is :jvm-opts only for configuring shadow and not other parts of an app? I’ve been able to run a Ring server in the project just fine.

Klay20:08:23

Albeit I load it in my editor (Calva) separately to get it running

thheller21:08:40

well, you can do that yes