"Error evaluating:" (clojure.pprint/pprint 10) :as "clojure.pprint.pprint.call(null,10);\n"

11 views
Skip to first unread message

Andy Gibraltar

unread,
Sep 15, 2013, 12:48:40 PM9/15/13
to nrep...@googlegroups.com

I get the following error message when I type number 10 to the emacs nrepl, same thing happens for whatever type.

"Error evaluating:" (clojure.pprint/pprint 10) :as "clojure.pprint.pprint.call(null,10);\n"
#TypeError: Cannot read property 'pprint' of undefined
at goog.messaging.AbstractChannel.deliver (http://localhost:3000/piggieback_browser.js:28088:13)
at goog.net.xpc.CrossPageChannel.xpcDeliver (http://localhost:3000/piggieback_browser.js:29458:14)
at Function.goog.net.xpc.NativeMessagingTransport.messageReceived_ (http://localhost:3000/piggieback_browser.js:28872:13)
at goog.events.Listener.handleEvent (http://localhost:3000/piggieback_browser.js:22998:26)
at Object.goog.events.fireListener (http://localhost:3000/piggieback_browser.js:23375:19)

Here's my project.clj:

(defproject pp "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :license {:name "Eclipse Public License"
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [org.clojure/clojurescript "0.0-1878"]
                 [com.cemerick/piggieback "0.1.0"]]
  :plugins [[lein-cljsbuild "0.3.3"]]
  :repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}
  :cljsbuild {
              :builds [{
                        :source-paths ["src"]
                        :builds nil,
                        :compiler {
                                   :output-to "piggieback_browser.js"
                                   :optimizations :whitespace
                                   :pretty-print true}}]})

On command line:
lein cljsbuild once
lein repl

On Emacs I start M-x nrepl and connect to the repl then type following and then load the page with browser code in it.

(require 'cljs.repl.browser)
(cemerick.piggieback/cljs-repl
  :repl-env (cljs.repl.browser/repl-env :port 9000))

If I start the piggieback client on the command line but not over Emacs nrepl connection it works.


 |
 | "It looks like nrepl.el is sending the form you're trying to evaluate wrapped in a pprint call. You need to make it stop doing that. :-)"
 |

Any idea how to fix it?

Thanks,
Andy


Reply all
Reply to author
Forward
0 new messages