ClojureScript

Transitive foreign libs not loaded in non-browser REPLs

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    {:deps {org.clojure/clojurescript {:mvn/version "1.10.339"}}}

Description

mylib.js
mylib = { abc: 3 }
other.js
other = { def: 17 }
co.edn
{:foreign-libs [{:file "mylib.js"
                 :provides ["my-lib"]
                 :requires ["other-lib"]}
                {:file "other.js"
                 :provides ["other-lib"]}]}

Working, with browser REPL:

$ clj -m cljs.main -co co.edn -r
ClojureScript 1.10.339
cljs.user=> (require 'my-lib)

cljs.user=> js/other
#js {:def 17}

Faling with Node:

$ clj -m cljs.main -co co.edn -re node -r
ClojureScript 1.10.339
cljs.user=> (require 'my-lib)
nil
cljs.user=> js/other
repl:13
throw e__6464__auto__;
^

ReferenceError: other is not defined
...

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: