This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-10
Channels
- # announcements (3)
- # beginners (67)
- # calva (4)
- # cider (3)
- # clj-kondo (58)
- # cljs-dev (4)
- # clojure (172)
- # clojure-berlin (4)
- # clojure-chicago (8)
- # clojure-europe (4)
- # clojure-greece (8)
- # clojure-italy (12)
- # clojure-nl (4)
- # clojure-spec (7)
- # clojure-uk (77)
- # clojurescript (13)
- # clojutre (16)
- # core-async (10)
- # cursive (3)
- # datomic (29)
- # figwheel-main (27)
- # fulcro (22)
- # garden (3)
- # jobs (2)
- # jobs-discuss (13)
- # juxt (5)
- # leiningen (14)
- # mount (4)
- # off-topic (28)
- # pathom (6)
- # pedestal (8)
- # portland-or (2)
- # re-frame (20)
- # remote-jobs (6)
- # shadow-cljs (13)
- # sql (74)
- # testing (17)
- # tools-deps (1)
- # vim (1)
- # xtdb (1)
Hey all. I've gone through the really painful journey of migrating from lein -> deps.edn. This included moving from figwheel-sidecar to figwheel-main. I have everything working with the exception of the repl integration with cider (the ui loads as I would expect). It appears that my websocket connection fails in my console with the followin gmessage:
socket.cljs?rel=1562357436120:71 WebSocket connection to '' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
You may notice its trying to connect to example
? This is odd as i have a file named dev.cljs.edn
.
My config is incredibly simple atm:
;; dev.cljs.edn
{:main myapp.meow}
;; myapp.meow
(ns ^:figwheel-no-load myapp.meow
(:require [myapp.core :as core]
[devtools.core :as devtools]
[cljs.spec.test.alpha :as stest]))
(prn "doing it meow")
(enable-console-print!)
(devtools/install!)
(core/init!)
(stest/instrument)
I curiously do not see the printline eitherinteresting. figwheel-ws isn't anywhere in the figwheel-main repo but i see it in lein-figwheel
grep for figwheel in the frontend? possible your dev front end reaches out on its own?
I see nothing:
kvlt@trve [19:07:12] [~/workspace/myapp/src/cljs] [feature/depsedn *]
-> % ag "figwheel"
myapp/meow.cljs
1:(ns ^:figwheel-no-load myapp.meow
This is also super weird:
[Figwheel] Validating figwheel-main.edn
[Figwheel] figwheel-main.edn is valid \(ツ)/
[Figwheel] Compiling build dev to "target/public/cljs-out/dev-main.js"
[Figwheel] Successfully compiled build dev to "target/public/cljs-out/dev-main.js" in 28.511 seconds.
[Figwheel] Watching paths: ("src/cljs") to compile build - dev
[Figwheel] Starting Server at
[Figwheel] Starting REPL
Prompt will show when REPL connects to evaluation environment (i.e. a REPL hosting webpage)
Figwheel Main Controls:
(figwheel.main/stop-builds id ...) ;; stops Figwheel autobuilder for ids
(figwheel.main/start-builds id ...) ;; starts autobuilder focused on ids
(figwheel.main/reset) ;; stops, cleans, reloads config, and starts autobuilder
(figwheel.main/build-once id ...) ;; builds source one time
(figwheel.main/clean id ...) ;; deletes compiled cljs target files
(figwheel.main/status) ;; displays current state of system
Figwheel REPL Controls:
(figwheel.repl/conns) ;; displays the current connections
(figwheel.repl/focus session-name) ;; choose which session name to focus on
In the cljs.user ns, controls can be called without ns ie. (conns) instead of (figwheel.repl/conns)
Docs: (doc function-name-here)
Exit: :cljs/quit
Results: Stored in vars *1, *2, *3, *e holds last exception object
Opening URL
user>
everything looks normal except that it does not have cljs.user
and has user
insteadThat seems to load with the text "debux test". Only console error is: GET http://localhost:9500/js/main.js net::ERR_ABORTED 404 (Not Found)
so your page is saying load the js from js/main.js and that's not where your compiler is putting it
location of your js: public/cljs-out/dev-main.js but you're asking for it at js/main.js
those are compiler settings. i think you want to put those in your dev.cljs.edn file
https://github.com/bhauman/figwheel-main#quick-way-to-understand-the-command-line-options check the output-to and output-dir settings