andrewmcveigh / cljs-time

A clj-time inspired date library for clojurescript.
342 stars 57 forks source link

unparse fails in rhino repl with a null call error #63

Open Kungi opened 8 years ago

Kungi commented 8 years ago

I tried running the following code in rhino repl but it fails.

clj-demgen.main> (cemerick.piggieback/cljs-repl (cljs.repl.rhino/repl-env))
To quit, type: :cljs/quit
nil
cljs.user> (require '[cljs-time.core :as date])
nil
cljs.user> (require '[cljs-time.format :as date-format])j
nil
cljs.user> (date-format/unparse (date-format/formatters :basic-date-time)
                                 (date/today-at 12 00))
org.mozilla.javascript.EcmaError: TypeError: Cannot call method "call" of null (rhino.clj#41)
hlolli commented 8 years ago

Got this error too. Im also using cljs-time but didn't see a connection to this error and that library until I saw you issue. All I did was try to boot figwheel and the following appeared:

user> (run)
WARNING: Use of undeclared Var user/run at line 1 <cljs repl>
org.mozilla.javascript.EcmaError: TypeError: Cannot call method "call" of undefined (rhino.clj#41)

ahh nevermind, I was just using the wrong repl of the two.