When I try to run the clojurescript node repl for a leiningen project with
npm-deps, I get the following error:
lein trampoline run -m clojure.main repl.clj
ClojureScript Node.js REPL server listening on 55620
To quit, type: :cljs/quit
cljs.user=> cljs.user=> (require 'mpgui.core)
clojure.lang.ExceptionInfo: No such namespace: xml2js, could not locate
xml2js.cljs, xml2js.cljc, or JavaScript source providing "xml2js" in file
/hom
e/dusan/maximoplus-gui/src/mpgui/core.cljs {:tag :cljs/analysis-error}
at clojure.core$ex_info.invokeStatic(core.clj:4617)
at clojure.core$ex_info.invoke(core.clj:4617)
at cljs.analyzer$error.invokeStatic(analyzer.cljc:697)
at cljs.analyzer$error.invoke(analyzer.cljc:693)
at cljs.analyzer$error.invokeStatic(analyzer.cljc:695)
...
However, this works:
lein trampoline run -m clojure.main repl.clj
ClojureScript Node.js REPL server listening on 54333
To quit, type: :cljs/quit
cljs.user=> (in-ns 'mpgui.core)
nil
mpgui.core=> (load-namespace 'mpgui.core)
nil
mpgui.core=> xml2js
WARNING: Use of undeclared Var mpgui.core/xml2js at line 1 <cljs repl>
nil
mpgui.core=> (load-file "src/mpgui/core.cljs")
nil
mpgui.core=> xml2js
#js {:defaults #js {"0.1" #js {:explicitCharkey false, :trim true,
:normalize true, :normalizeTags false, :attrkey "@", :charkey "#",
:explicitArray f
alse, :ignoreAttrs false, :mergeAttrs false, :explicitRoot false,
:validator nil, :xmlns false, :explicitChildren false, :childkey "@@",
:charsAsChild
ren false, :includeWhiteChars false, :async false, :strict true,
:attrNameProcessors nil, :attrValueProcessors nil, :tagNameProcessors nil,
:valueProc
essors nil, :emptyTag ""}, "0.2" #js {:explicitCharkey false, :trim false,
:normalize false, :normalizeTags false, :attrkey "$", :charkey "_", :explic
itArray true, :ignoreAttrs false, :mergeAttrs false, :explicitRoot true,
:validator nil, :xmlns false, :explicitChildren false,
:preserveChildrenOrder
false, :childkey "$$", :charsAsChildren false, :includeWhiteChars false,
:async false, :strict true, :attrNameProcessors nil, :attrValueProcessors ni
l, :tagNameProcessors nil, :valueProcessors nil, :rootName "root", :xmldec
#js {:version "1.0", :encoding "UTF-8", :standalone true}, :doctype nil, :r
enderOpts #js {:pretty true, :indent " ", :newline "\n"}, :headless false,
:chunkSize 10000, :emptyTag "", :cdata false}}, :processors #js {:normaliz
e #object[Function], :firstCharLowerCase #object[Function], :stripPrefix
#object[Function], :parseNumbers #object[Function], :parseBooleans
#object[Fu
nction]}, :ValidationError #object[ValidationError], :Builder
#object[Builder], :Parser #object[Parser], :parseString #object[Function]}
Any ideas why this works, and the first example doesn't? I am using
clojurescript 1.9.946
Thanks
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/clojurescript.