This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (3)
- # babashka (17)
- # beginners (163)
- # bristol-clojurians (1)
- # calva (18)
- # chlorine-clover (17)
- # clj-kondo (13)
- # cljs-dev (50)
- # cljsjs (3)
- # cljsrn (13)
- # clojure (218)
- # clojure-dev (5)
- # clojure-europe (9)
- # clojure-italy (10)
- # clojure-nl (8)
- # clojure-uk (107)
- # clojurescript (25)
- # conjure (163)
- # crux (2)
- # cursive (63)
- # data-science (9)
- # datomic (38)
- # docker (1)
- # figwheel (34)
- # figwheel-main (3)
- # fulcro (15)
- # graalvm (1)
- # helix (12)
- # jobs (3)
- # juxt (5)
- # kaocha (3)
- # lein-figwheel (2)
- # leiningen (6)
- # luminus (2)
- # malli (1)
- # meander (12)
- # nrepl (4)
- # rdf (2)
- # re-frame (2)
- # reagent (7)
- # reitit (5)
- # remote-jobs (2)
- # rum (1)
- # shadow-cljs (65)
- # spacemacs (27)
- # tools-deps (18)
- # vim (19)
To describe my problem in more detail:
The REPL compiles my
CLJS and starts the browser off at
localhost:3449 as expected, and the compiled js is shown in the browser. The REPL never gets a prompt, though. There are some errors in the browser console, but they seem insignificant - something about not having a favicon, something about not being able to load source-maps. Usually when I’ve started
localhost:3449 up for an app, and the browser cannot connect to the REPL (because it’s not running), the browser repeatedly states that it’s unable to connect to figwheel. This does not happen here; there are no connection-related messages in the browser console.
lein figwheel in the terminal, so the problem is not related to IntelliJ or Cider or whatever.
@reefersleep do you have clj code involved? Did it compile?
lein check on your project
Nope, they’re CLJS only - that’s the
-frontend part of the
reagent-frontend template I’ve used 🙂
I did not update dependencies or otherwise manipulate all of those projects in a similar manner at once, so I suspected that maybe I had somehow had something rotten in
.m2. Tried deleting it and building anew, no difference.
Can you run perhaps
lein cljsbuild commands successfully. Just seeing if you can reduce it down more. Perhaps not.
To be clear; I was working on one project, and figwheel stopped working for all projects, most of which I haven’t touched in a long time.
lein figwheel compiles fine as well, I get all of the usual output, right down to
Successfully compiled "resources/public/js/compiled/bouncy.js" in 3.641 seconds. Figwheel: Starting CSS Watcher for paths ["resources/public/css"] Figwheel: Starting nREPL server on port: 7002 Launching ClojureScript REPL for build: dev Figwheel Controls: (stop-autobuild) ;; stops Figwheel autobuilder (start-autobuild [id ...]) ;; starts autobuilder focused on optional ids (switch-to-build id ...) ;; switches autobuilder to different build (reset-autobuild) ;; stops, cleans, and starts autobuilder (reload-config) ;; reloads build config and resets autobuild (build-once [id ...]) ;; builds source one time (clean-builds [id ..]) ;; deletes compiled cljs target files (print-config [id ...]) ;; prints out build configurations (fig-status) ;; displays current state of system Switch REPL build focus: :cljs/quit ;; allows you to switch REPL to another build Docs: (doc function-name-here) Exit: Control+C or :cljs/quit Results: Stored in vars *1, *2, *3, *e holds last exception object Prompt will show when Figwheel connects to your application
I just never get that prompt, because the connection is never established, as far as I can tell.
The weird thing is that the browser does not report that it failed to establish the connection! (Which it usually does when the app is running in dev mode, and I close my REPL)
figwheel-main works, and it runs on a different port. I’ll try changing the
:server-port for figwheel from the default
@reefersleep using your browser dev tools are you seeing any index page being server at all when you hit your figwheel server port?
If it is serving you some response assets. Look around through the source some. See if you see what you expect there. Figwheel js and your project js files.
@mikerod thanks for the suggestions. I haven’t progressed much; been working all day, on my work computer 🙂 I think I’m going to look in it some more, now. It’s curious, for one, that there doesn’t seem to be any figwheel code assets, there seemed to be on my work project.
every so often if a figwheel thing fails too early on it can be difficult to get any debugging info from it
The thing is, it’s a system-wide thing, it seems. If I do
lein new reagent-frontend my-new-project and cd into that, and
lein figwheel, I get exactly the same problem.
That’s why I thought maybe it was a port thing. I mean, I don’t know how, but maybe I’d messed up some routing in my system…. ????
my-new-project I just created has figwheel code loaded into the browser, but still does not connect to the repl.
lein new figwheel hello-world, and this manages to connect to the repl! Now I just have to figure out what the difference is.
There seem to be so few differences between these two things, and yet it’s taking so long to sort it out. I give up. I’m going to create a new application with
lein new figwheel and move whatever code I want to work with in there.
I’ve been in these situations before, and it’s maybe the suckiest side of Clojure - my tools or build chain just stops working for strange, indecipherable reasons, and I spend wayyyy too long trying to figure out why.