Closed brmrodrigues closed 4 years ago
In Shadow-CLJS (ClojureScript), you can't evaluate the namespace if it contains node/browser/string requires because Shadow becomes confused. I don't know if this is a ClojureScript issue or Shadow one. You can reproduce the issue with a cljs-repl
by doing the following code on the REPL:
(let [res
(ns mario.combine
(:require ["swagger-combine" :as swagger-combine]
[promesa.core :as p]))
(def combine-try
(-> (swagger-combine "swaggers/dummy/combined-swaggers.json")
(p/handle (fn [res _err]
(-> res js/JSON.stringify js/console.log)))))
The fix is simply do not evaluate the ns
form - ever. On shadow-cljs, hot-reload plays a significant role so everytime you save your file, your namespace is already up-to-date - no need to re-eval it :smiley:
I'm making a POC with https://github.com/maxdome/swagger-combine. I tried to run the following