Fork me on GitHub
#figwheel-main
<
2019-02-04
>
jaide06:02:39

Does using the figwheel --main option not support node’s builtin modules?

andrea.crotti11:02:28

I'm having a strange problem with my projects where figwheel main never gives me a cljs repl

andrea.crotti11:02:49

I thought it was related with Cider but the same happens if I do it from the terminal

andrea.crotti11:02:19

everything actually works otherwise, don't see errors in the browser console or the terminal itself, but I just don't get a cljs repl

andrea.crotti11:02:25

any idea how to debug that kind of behaviour?

andrea.crotti11:02:48

I wonder if it's related to these warnings

[Figwheel] Compile Warning: var: rewrite-clj.reader/whitespace? is not public  resources/public/cljs-out/dev/rewrite_clj/parser/core.cljs   line:149  column:10
[Figwheel] Compile Warning: No such namespace: mranderson048.re-frame.v0v10v2.re-frame.db, could not locate mranderson048/re_frame/v0v10v2/re_frame/db.cljs, mranderson048/re_frame/v0v10v2/re_frame/db.cljc, or JavaScript source providing "mranderson048.re-frame.v0v10v2.re-frame.db" (Please check that namespaces with dashes use underscores in the ClojureScript file name)  resources/public/cljs-out/dev/day8/re_frame_10x.cljs   line:238  column:61
[Figwheel] Compile Warning: Use of undeclared Var mranderson048.re-frame.v0v10v2.re-frame.db/app-db  resources/public/cljs-out/dev/day8/re_frame_10x.cljs   line:238  column:61
[Figwheel] Compile Warning: No such namespace: mranderson048.re-frame.v0v10v2.re-frame.db, could not locate mranderson048/re_frame/v0v10v2/re_frame/db.cljs, mranderson048/re_frame/v0v10v2/re_frame/db.cljc, or JavaScript source providing "mranderson048.re-frame.v0v10v2.re-frame.db" (Please check that namespaces with dashes use underscores in the ClojureScript file name)  resources/public/cljs-out/dev/day8/re_frame_10x.cljs   line:238  column:61
[Figwheel] Compile Warning: Use of undeclared Var mranderson048.re-frame.v0v10v2.re-frame.db/app-db  resources/public/cljs-out/dev/day8/re_frame_10x.cljs   line:238  column:61
[Figwheel] Successfully compiled build dev to "resources/public/cljs-out/dev-main.js" in 17.733 seconds.

andrea.crotti11:02:03

it should not be though the js is still compiled correctly

andrea.crotti11:02:06

and everything still works

andrea.crotti11:02:17

even re-frame 10x

Jan K11:02:48

@andrea.crotti How are you starting the CLJS REPL? Are you sure the browser is connected? (try refreshing the browser, you don't get the REPL prompt until a browser connects)

andrea.crotti12:02:16

yeah the browser is definitively connected

andrea.crotti12:02:34

I even see things like

[goog.net.WebSocket] Opening the WebSocket on 
console.js:203  [goog.net.WebSocket] WebSocket opened on 
console.js:203  [Figwheel REPL] Session ID: fab1f704-5c64-45ed-9db2-2858dc1b8c8c
console.js:203  [Figwheel REPL] Session Name: Stephan

andrea.crotti12:02:57

launching figwheel both with Cider and with lein trampoline run -m figwheel.main -b dev -r directly

andrea.crotti12:02:28

so well in general everything was working perfectly fine last week, I can't find what changed to cause it not work anymore

andrea.crotti12:02:02

I thought it was something with my other machines but it happens with 2 different projects on 2 different machines now 😮 I even cleared my lein/profiles.clj just in case

andrea.crotti13:02:05

this is really weird, I even went back in the history in the repo and it still doesn't work

andrea.crotti14:02:31

I did and that works fine 😄

andrea.crotti14:02:53

which is why I'm even more confused

jaide20:02:06

Still wrestling with that deps working in build but not test contexts, created an issue https://github.com/bhauman/figwheel-main/issues/148 and https://github.com/eccentric-j/minirepro-fig-test-deps as minimal reproduction repo