nrepl/piggieback

pprint.js 404 error with boot-cljs-repl, can't print expr result

alechstong opened this issue · 1 comments

I tried 0.4.2, and everything is working again.

I know there's section in the README about pretty printing, but I'm very new to cljs, and I just can't figure it out.

here's the error in the browser:

jsloader.js:216 GET http://localhost:3000/js/app.out/cljs/pprint.js net::ERR_ABORTED 404 (Not Found)

and here's the error message in the cljs-repl:

cljs.user=> (js/alert "test")

#object[TypeError TypeError: Cannot read property 'pprint' of undefined]
TypeError: Cannot read property 'pprint' of undefined
    at eval (eval at <anonymous> (http://localhost:3000/js/app.out/weasel/repl.js:30:495), <anonymous>:12:13)
    at http://localhost:3000/js/app.out/weasel/repl.js:30:495
    at http://localhost:3000/js/app.out/weasel/repl.js:39:4
    at Object.G__12572__2 (http://localhost:3000/js/app.out/cljs/core.js:35814:106)
    at Object.G__12572 [as call] (http://localhost:3000/js/app.out/cljs/core.js:36081:20)
    at goog.net.WebSocket.<anonymous> (http://localhost:3000/js/app.out/weasel/repl.js:190:71)
    at goog.net.WebSocket.goog.events.EventTarget.fireListeners (http://localhost:3000/js/app.out/goog/events/eventtarget.js:284:23)
    at Function.goog.events.EventTarget.dispatchEventInternal_ (http://localhost:3000/js/app.out/goog/events/eventtarget.js:381:26)
    at goog.net.WebSocket.goog.events.EventTarget.dispatchEvent (http://localhost:3000/js/app.out/goog/events/eventtarget.js:196:34)
    at goog.net.WebSocket.onMessage_ (http://localhost:3000/js/app.out/goog/net/websocket.js:426:8)

Here are the dependencies I'm using

  :dependencies '[[org.clojure/clojurescript	"1.10.339"]
		              [adzerk/boot-cljs						"2.1.5"	:scope	"test"]
		              [adzerk/boot-reload					"0.6.1" :scope	"test"]
									;; the follow 4 deps are for cljs repl
		              [cider/piggieback		        "0.5.2" :scope	"test"]
		              [weasel					            "0.7.0" :scope	"test"]
		              [adzerk/boot-cljs-repl			"0.4.0" :scope	"test"]
		              [nrepl											"0.8.3" :scope	"test"]
									;; to fix datatypeconverter not found error with some jdk versions
									[javax.xml.bind/jaxb-api "2.4.0-b180830.0359"]
		              [pandeiro/boot-http					"0.8.3"	:scope	"test"]]

Nevermind, I figured it out. It's the version of boot.

The link on github README installs v2.7.2, not the latest. boot -u solved it.