figwheel-main

figwheel-main http://figwheel.org
dominicm 2020-04-30T18:38:40.114200Z

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

PB 2020-04-30T18:48:33.116900Z

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?

dominicm 2020-04-30T18:49:20.117Z

@petr have you opened the browser?

PB 2020-04-30T18:49:28.117300Z

@dominicm I have

dominicm 2020-04-30T18:49:38.117500Z

In your browser console, are there any indications it may not have connected?

PB 2020-04-30T18:49:40.117700Z

It's set to open automatically.

dominicm 2020-04-30T18:49:44.117800Z

Figwheel likes to log

PB 2020-04-30T18:49:51.118100Z

The browser does not log anything

PB 2020-04-30T18:51:51.118800Z

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&amp;fwbuild=dev&amp;fwsid=68bacca5-1316-4496-92fe-ba153fdbe22d>
websocket.js:283 WebSocket connection to '<ws://localhost:9500/figwheel-connect?fwprocess=901d70&amp;fwbuild=dev&amp;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&amp;fwbuild=dev&amp;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&amp;fwbuild=dev&amp;fwsid=68bacca5-1316-4496-92fe-ba153fdbe22d>
websocket.js:283 WebSocket connection to '<ws://localhost:9500/figwheel-connect?fwprocess=901d70&amp;fwbuild=dev&amp;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

dominicm 2020-04-30T18:55:26.118900Z

A 500 while creating the websocket... hmm... My best guess is a jetty version conflict.

dominicm 2020-04-30T18:56:04.119Z

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.

dominicm 2020-04-30T19:40:46.119100Z

@petr Do you have other deps in your proj? can you share?

2020-04-30T19:48:38.120100Z

@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

2020-04-30T20:20:07.123Z

On second glance, I don't think that applies to you, since you're running the clojurecommand, not clj. Disregard.

PB 2020-04-30T20:34:37.123800Z

Sorry for the run around. Ive decided to stick with sidecar, the move to figwheel-main was proving to be aquite a pain

PB 2020-04-30T20:34:43.124Z

Thank you all for the help

dominicm 2020-04-30T20:41:22.124500Z

@petr if you're migrating, I'm certain it's a dependency conflict

dominicm 2020-04-30T20:42:33.124800Z

https://figwheel.org/docs/jetty_conflicts.html

PB 2020-04-30T21:37:00.125300Z

I do not have jetty specified as a dependency

dominicm 2020-04-30T22:27:45.125800Z

@petr worth checking your dependency tree :)