adzerk-oss / boot-cljs-repl

Boot task providing a REPL for ClojureScript development.
Eclipse Public License 1.0
72 stars 28 forks source link

jsloader GET pprint.js 404, cannot see return in cljs-repl #66

Closed alechstong closed 3 years ago

alechstong commented 3 years ago

keep getting this error message in the browser whenever connected to cljs-repl, and after every command from cljs-repl (and I can't see the return value of each command)

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"]]
alechstong commented 3 years ago

It may have something to do with piggieback, I downgraded it to 0.4.2, and the error disappeared

It is boot's version. The script on docs installs v2.7.2. Once updated to 2.8.3, everything is working