Using figwheel, I'm getting an issue with uix: > java.io.FileNotFoundException: /src/target/dev/public/frontend.out/cljs/loader.js (No such file or directory) Initial build is fine, but reloading is not. I suspect it's an issue due to uix using the cljs.loader namespace. I currently have uix in my built-inputs due to various reasons. Here's the line where uix uses cljs.loader: https://github.com/roman01la/uix/blob/master/core/src/uix/core/lazy_loader.cljc#L6
Hi all, silly question I seem to be stuck on...
When I run clojure -m figwheel.main
I get the figwheel-main page opened and connected.
However, when I specify a buildfile dev.cljs.edn
with the contents:
{:main myapp.moo}
with the corresponding file src/myapp/moo.cljs
:
(ns myapp.moo)
(js/console.log "Hello there world!")
It seems to be unable to connect using the command: clojure -m figwheel.main --build dev --repl
Am I missing something?@petr have you opened the browser?
@dominicm I have
In your browser console, are there any indications it may not have connected?
It's set to open automatically.
Figwheel likes to log
The browser does not log anything
Actually, that appeared to be a dependency issue: It now logs
moo.cljs:3 Hello there world!
console.js:203 [<http://goog.net|goog.net>.WebSocket] Opening the WebSocket on <ws://localhost:9500/figwheel-connect?fwprocess=901d70&fwbuild=dev&fwsid=68bacca5-1316-4496-92fe-ba153fdbe22d>
websocket.js:283 WebSocket connection to '<ws://localhost:9500/figwheel-connect?fwprocess=901d70&fwbuild=dev&fwsid=68bacca5-1316-4496-92fe-ba153fdbe22d>' failed: Error during WebSocket handshake: Unexpected response code: 500
console.js:203 [<http://goog.net|goog.net>.WebSocket] An error occurred: undefined
console.js:203 [<http://goog.net|goog.net>.WebSocket] The WebSocket on <ws://localhost:9500/figwheel-connect?fwprocess=901d70&fwbuild=dev&fwsid=68bacca5-1316-4496-92fe-ba153fdbe22d> closed.
console.js:203 [<http://goog.net|goog.net>.WebSocket] The WebSocket disconnected unexpectedly: undefined
console.js:203 [<http://goog.net|goog.net>.WebSocket] Seconds until next reconnect attempt: 1
console.js:203 [<http://goog.net|goog.net>.WebSocket] Opening the WebSocket on <ws://localhost:9500/figwheel-connect?fwprocess=901d70&fwbuild=dev&fwsid=68bacca5-1316-4496-92fe-ba153fdbe22d>
websocket.js:283 WebSocket connection to '<ws://localhost:9500/figwheel-connect?fwprocess=901d70&fwbuild=dev&fwsid=68bacca5-1316-4496-92fe-ba153fdbe22d>' failed: Error during WebSocket handshake: Unexpected response code: 500
console.js:203 [<http://goog.net|goog.net>.WebSocket] An error occurred: undefined
A 500 while creating the websocket... hmm... My best guess is a jetty version conflict.
I would have hoped you'd get more details though, maybe in the repl or something. But as you didn't mention it, I'm guessing you didn't.
@petr Do you have other deps in your proj? can you share?
@petr See this: https://figwheel.org/docs/main_script.html Copied from about halfway down the page: Figwheel and compile options when using `--main` Since the `-m` and `-b` options cannot be used at the same time you may be left wondering how to supply the options that you would normally supply with the `--build` option to the `--main` option. You can do this by providing your `[build-id].cljs.edn` file to the `-co` option. Figwheel will pick up both the metadata config along with the CLJS compiler config. For example the following will allow you to use the config in your `dev.cljs.edn` file:
$ clj -m figwheel.main -co dev.cljs.edn -m example.hello
On second glance, I don't think that applies to you, since you're running the clojure
command, not clj
. Disregard.
Sorry for the run around. Ive decided to stick with sidecar, the move to figwheel-main was proving to be aquite a pain
Thank you all for the help
@petr if you're migrating, I'm certain it's a dependency conflict
I do not have jetty specified as a dependency
@petr worth checking your dependency tree :)