Fork me on GitHub
#dirac
<
2016-10-20
>
ricardo.ekm10:10:04

Hi all! I'm trying to install Dirac to debug my clojurescript project, however I'm getting the following error:Internal Dirac Error TypeError: Cannot read property 'description' of undefined Dirac v0.7.2, Chrome/53.0.2785.143, Mac/10.10.5, Backend API/internal-56.0.2890.2@a83f4c8/460, Backend CSS/internal-56.0.2890.2@a83f4c8/406 DevTools code has thrown an unhandled exception: TypeError: Cannot read property 'description' of undefined at Object.compileCallback (<chrome-extension://kbkdngfljkchidcjpnfcgcokkbhlkogi/devtools/front_end/console/console_module.js:357:56>) at innerCallback (<chrome-extension://kbkdngfljkchidcjpnfcgcokkbhlkogi/devtools/front_end/inspector.js:8209:1>) at callback (<chrome-extension://kbkdngfljkchidcjpnfcgcokkbhlkogi/devtools/front_end/inspector.js:5720:39>) at Object.dispatchResponse (<chrome-extension://kbkdngfljkchidcjpnfcgcokkbhlkogi/devtools/front_end/inspector.js:5727:10>) at Object.dispatch (<chrome-extension://kbkdngfljkchidcjpnfcgcokkbhlkogi/devtools/front_end/inspector.js:5677:60>) at Object.onMessage (<chrome-extension://kbkdngfljkchidcjpnfcgcokkbhlkogi/devtools/frontend/inspector.js:12904:31>)

ricardo.ekm10:10:24

Dirac agent is running

ricardo.ekm10:10:25

Dirac Agent v0.7.2 Connected to nREPL server at <nrepl://localhost:8230>. Agent is accepting connections at <ws://localhost:8231>.

darwin10:10:45

hi @ricardo.ekm, the problem is that you are using old Chrome

ricardo.ekm10:10:59

And Dirac Chrome extension successfully connected to remote debugger 9002 port

darwin10:10:01

you must be using latest Canary

ricardo.ekm10:10:48

can you point me out where to download the latest canary?

ricardo.ekm10:10:23

great! thanks

darwin10:10:24

it is auto-updating, so you have no other choice but use the latest

darwin10:10:11

in case of troubles, with each dirac release you have links to matching chromium snapshots, that is solution of last resort: https://github.com/binaryage/dirac/releases

darwin10:10:55

for cases when dirac does not get timely updates and canary runs too far from it

ricardo.ekm10:10:06

maybe you can help me with one more issue, I've put the dirac dependency in my project

ricardo.ekm10:10:12

:dependencies [[org.clojure/clojure "1.8.0"] [org.clojure/clojurescript "1.8.51"] [binaryage/dirac "0.7.2"] [binaryage/devtools "0.8.2"]]

ricardo.ekm10:10:17

however I'm getting the following error

ricardo.ekm10:10:46

Dirac requires runtime support from your app. Please install Dirac Runtime into your app and enable the :repl feature. ReferenceError: dirac is not defined at <anonymous>:1:2

ricardo.ekm10:10:25

my full project file

ricardo.ekm10:10:28

(defproject signal-clojurescript "2.0.0" :description "FIXME: write description" :url "http://example.com/FIXME" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"] [org.clojure/clojurescript "1.8.51"] [binaryage/dirac "0.7.2"] [binaryage/devtools "0.8.2"]] :plugins [[lein-figwheel "0.5.4-7"] [lein-cljsbuild "1.1.4"] [lein-expectations "0.0.7"]] :resource-paths ["resources/"] :target-path "target/%s" :clean-targets [:target-path "js/out"] :profiles {:uberjar {:aot :all}} :repl-options {:port 8230 :nrepl-middleware [dirac.nrepl/middleware] :init (do (require 'dirac.agent) (dirac.agent/boot!))} :figwheel { :http-server-root "public" :server-port 3002 :server-ip "0.0.0.0" :repl false } :cljsbuild { :builds {:dev { :source-paths ["src"] :figwheel true :compiler {:main "signal-cljs.main" :source-map true :optimizations :none :asset-path "http://localhost:3002/js/out" :output-to "resources/public/js/main.js" :output-dir "resources/public/js/out"}} :prod { :source-paths ["src"] :compiler {:asset-path "https://static.takeabridge.com/js/out" :optimizations :advanced :pretty-print false :output-to "resources/public/js/main.js"}}}})

darwin10:10:04

you need dirac.runtime in :preloads, please follow installation instructions

ricardo.ekm10:10:55

sorry for asking again, I inserted the preload instruction but the error is the same

ricardo.ekm10:10:59

:compiler {:preloads [devtools.preload dirac.runtime.preload] :main "signal-cljs.main" :source-map true :optimizations :none :asset-path "http://localhost:3002/js/out" :output-to "resources/public/js/main.js" :output-dir "resources/public/js/out"}}

ricardo.ekm10:10:16

if I change dirac.runtime.preload to "blablabla" it keeps compiling

ricardo.ekm10:10:34

so maybe it isnt loading it

ricardo.ekm10:10:38

(I'm using figwheel, I don't if it matters)

darwin11:10:03

@ricardo.ekm you have to completely restart lein/figwheel when doing changes into project.clj

ricardo.ekm11:10:38

yes, I did it

ricardo.ekm11:10:44

tried lean clean

ricardo.ekm11:10:53

and deleted target folders

darwin11:10:01

ok, show me again your project.clj, but better paste it as a snippet (+ button here) or via http://gist.github.com

darwin11:10:16

looks good to me

darwin11:10:49

just your :clean-targets does not contain resources/public/js/out

darwin11:10:16

also you want to probably remove js/main.js to make really clean build

darwin11:10:42

so I would recommend to put it into js/out/main.js instead

darwin11:10:00

ah, now I see the issue

darwin11:10:19

you are using old clojurescript version

darwin11:10:34

1.8.51 had no awareness of :preloads

darwin11:10:41

it is pretty recent addition

ricardo.ekm11:10:10

great man, thanks! gonna upgrade

darwin11:10:29

go for 1.9.293