Fork me on GitHub

Not sure if this is a Conjure thing, or a CLJS/Figwheel thing, but getting this when I try to eval a file:

; (err) #object[SyntaxError SyntaxError: Unexpected identifier]
; (err) /Users/sproctor/.../update.cljs:1
; (err) (ns update
; (err)     ^^^^
; (err) 
; (err) SyntaxError: Unexpected identifier
; (err)     at new Script (vm.js:88:7)
; (err)     at createScript (vm.js:261:10)
; (err)     at runInThisContext (vm.js:309:10)
; (err)     at Object.nodeGlobalRequire (/Users/sproctor/.../target/fig/goog/bootstrap/nodejs.js:114:25)
; (err)     at cljs$core$load_file (/Users/sproctor/.../target/fig/cljs/core.js:325:13)
; (err)     at eval (eval at figwheel$client$utils$eval_helper (/Users/sproctor/.../target/fig/figwheel/client/utils.js:155:8), <anonymous>:1:313)
; (err)     at eval (eval at figwheel$client$utils$eval_helper (/Users/sproctor/.../target/fig/figwheel/client/utils.js:155:8), <anonymous>:9:3)
; (err)     at figwheel$client$utils$eval_helper (/Users/sproctor/.../target/fig/figwheel/client/utils.js:155:8)
when I eval a buffer, I get a result of nil, but not everything loaded in CLJS (with Figwheel)…. Clojure works as expected


Not sure right now, but do other namespaces work? Is it just because your namespace is called update?


no namespaces, just elided the details as this is for a work project


it is always showing the error on the first character of the namespace


just got a chance to test on a work shadow-cljs project that is node backed, and the eval (file) works, so looks like it might be a lein-fighweel related issue, or the way I connect to that repl


It may well be that with shadow you don't need to piggieback and figwheel you do :thinking_face: This might help if you're using figwheel.main but I don't think you are, I think lein-figwheel is the older version And here's Conjure's docs on piggieback


Because you can connect to a figwheel nREPL but I think it's in a weird JVM mode at first, then you "piggieback" the nREPL into CLJS land... it's a little confusing. I much prefer shadow-cljs' method 😅


will have to try that… been doing things like (figwheel-sidecar.repl-api/start-figwheel!) and (figwheel-sidecar.repl-api/cljs-repl "development") which turns the REPL session into a CLJS version


but maybe I then need to piggieback on top of that…


I think our end-goal is the slow migration to just deps.edn and the straight CLJS node runtime REPL, since we are doing node for AWS Lambdas…