This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (2)
- # beginners (130)
- # calva (72)
- # cider (4)
- # cljdoc (15)
- # cljs-dev (3)
- # cljsrn (2)
- # clojars (4)
- # clojure (55)
- # clojure-nl (1)
- # clojure-uk (19)
- # clojurescript (46)
- # cursive (95)
- # datomic (6)
- # figwheel (40)
- # fulcro (12)
- # hyperfiddle (3)
- # off-topic (11)
- # onyx (3)
- # parinfer (6)
- # pathom (15)
- # protorepl (38)
- # re-frame (67)
- # reitit (18)
- # shadow-cljs (45)
- # tools-deps (2)
@jsa-aerial its probably because of the path that you are using for your main.js script
@bhauman I tried that but the results are the same. Poking around some more, I see from console log that the server (in Figwheel) expects everything (entire directory structure) to be under a
Fig/public directory instead of just the usual
public directory. So, nothing in the iindex.html file is found or loaded (including the "main.js" script. I even tried giving the absolute path starting with
/public but server still tries loading from
OK, I even tried putting absolute and relative
resources in front. With
/resources/public/path/to/main.js the path is actually that, but the file is not found (maybe because it is really looking for
/resources/resources... ??). If it is relative then it ends up being
Fig/resources/.... It doesn't look like it is possible to do this with the way Figwheel currently resolves paths.
OK - I don't have any other 'path' stuff configured - maybe there is an option I'm missing?
do you have the
tree program installed so that I can get a quick look at your directory structure?
One thing I do know. This project actually is all about setting up a client and server and when I start the projects server (on another port) it can serve the
Fig/index.html and correctly serve all the other resources.
Frankly, one 'solution' is to just browse to the projects server address and things simply work. But that's a bit annoying
Exactly - except figwheel does not get the resources correct. The project server does
So, to be explicit this
(which opens automatically) gets the resources wrong, but this
gets the resources correct.
Maybe there is something else wrong - I have
:open-urls as the key (note ending 's'). Is that wrong? I got this from a template
I'm pretty sure I'm using figwheel-main. Well, I start by getting a repl (just lein repl) and then issue
(use 'figwheel-sidecar.repl-api) and then
And figwheel is still opening up port localhost:3449 - and if you browse there still serves up wrong paths. Shrug.
Since I always have the project server start (and in testing always use 3003) I can just use
:open-urls with that address and things will just work. Still, seems odd that the server at 3449 doesn't get this right. One thing the project server also does is set the resources route to "/":
(route/resources "/"). Maybe figwheel doesn't do that?