我试图在我的re-frame/reagent/leiningen项目中使用cljsjs/vis,但将此库导入命名空间时出现错误。
cljsjs/vis in namespace required but not available
Run Code Online (Sandbox Code Playgroud)
已尝试使用其他库进行图表/数据可视化,但仍然有相同的结果。将 JS 库导入到 clojurescript 项目似乎有问题。
莱宁根project.cljs档案
(defproject test1 "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.10.1"]
[org.clojure/clojurescript "1.10.764"
:exclusions [com.google.javascript/closure-compiler-unshaded
org.clojure/google-closure-library
org.clojure/google-closure-library-third-party]]
[thheller/shadow-cljs "2.9.3"]
[reagent "0.10.0"]
[re-frame "0.12.0"]
[cljs-ajax "0.7.5"]
[cljsjs/vis "4.21.0-1"]]
:plugins [[lein-shadow "0.2.0"]
[lein-shell "0.5.0"]]
:min-lein-version "2.9.0"
:source-paths ["src/clj" "src/cljs"]
:clean-targets ^{:protect false} ["resources/public/js/compiled" "target"]
:shell {:commands {"open" {:windows ["cmd" "/c" "start"]
:macosx "open"
:linux "xdg-open"}}}
:shadow-cljs {:nrepl {:port 8777}
:builds {:app {:target :browser
:output-dir "resources/public/js/compiled"
:asset-path "/js/compiled"
:modules …Run Code Online (Sandbox Code Playgroud)