This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-12-30
Channels
- # adventofcode (7)
- # announcements (9)
- # babashka (20)
- # beginners (182)
- # calva (9)
- # cider (20)
- # circleci (3)
- # clj-kondo (1)
- # clojure (269)
- # clojure-europe (2)
- # clojure-india (1)
- # clojure-italy (6)
- # clojure-nl (5)
- # clojure-uk (50)
- # clojurescript (56)
- # code-reviews (3)
- # core-async (174)
- # datomic (4)
- # duct (1)
- # emacs (3)
- # events (1)
- # fulcro (31)
- # graalvm (10)
- # graphql (8)
- # jobs (1)
- # joker (11)
- # juxt (7)
- # luminus (2)
- # malli (4)
- # off-topic (2)
- # overtone (1)
- # pathom (2)
- # re-frame (24)
- # shadow-cljs (42)
- # sql (1)
- # tools-deps (10)
I am trying to get this template project over to shadow-cljs, but am failing: https://github.com/enterlab/rente
I’m at where I get these errors in the js console:
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (style.css, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (main.js, line 0)
[Error] Refused to execute as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
[Error] ReferenceError: Can't find variable: goog
Global Code (0.0.0.0:14)
My shadow-cljs looks like so:
{:dependencies
[[org.clojure/core.async "0.4.490"]
[com.stuartsierra/component "0.4.0"]
[environ "1.1.0"]
[ch.qos.logback/logback-classic "1.2.3"]
[org.clojure/tools.logging "0.4.1"]
[ring/ring-core "1.7.1"]
[ring/ring-defaults "0.3.2"]
[compojure "1.6.1"]
[http-kit "2.4.0-alpha2"]
[com.taoensso/sente "1.13.1"]
#_[com.cognitect/transit-clj "0.8.313"]
#_[com.cognitect/transit-cljs "0.8.256"]
[org.clojure/tools.namespace "0.3.0-alpha4"]
[reagent "0.8.1"]
[org.webjars/bootstrap "4.2.1"]]
:source-paths
["src" "dev" "resources/public"]
:builds
{:app {:target :browser
:output-dir "resources/public/js"
:asset-path "/public/js"
:modules {:main {:entries []}}}}}
@pez :asset-path
looks incorrect. the server is likely using resources/public
as a root? or probably should be?
Hmm, I have tried that, but going at it again, if I change the source-paths entry to just "resources"
, I get rid of the 404 errors. But now shadow-cljs shows a “Stale client” error.
shadow-cljs is not made for CLJ development. you should probably be running it via lein or clj
Me neither, it seems. 😄 The server starts though… But I’ll go back to lein for that then.
Correct, I issue (run)
as part of the jack-in. This is how the template is wired. I had forgotten about that part…
that doesn't do anything different really ... you should maybe try to understand what is going on though 😉