figwheel-main

figwheel-main http://figwheel.org
ozzloy 2020-07-30T15:24:24.201600Z

https://github.com/bhauman/figwheel-main/blob/master/helper-content/missing_index.md says

In this case, you may want to change :open-url to "http://[[server-hostname]]/[[server-port]]/app.html" in order to change the launch page
but should say
In this case, you may want to change :open-url to "http://[[server-hostname]]:[[server-port]]/app.html" in order to change the launch page
note the ":" between hostname and port.

oly 2020-07-30T15:39:05.204100Z

wonder if some one can help, struggling with testing I have a simple test file under test/cljs/project/test-file.cljs in deps.edn i have test/cljs added to my paths, when i jack in I can see the testing.js generated and its loaded in the html buut it errprs because none of the test namespace files are put into the cljs-out/dev/project/ folder so i get a js error

oly 2020-07-30T15:39:59.205200Z

what should i be looking for beyond the deps paths that would mean the namespaces are not compiled

oly 2020-07-30T15:41:14.205900Z

^{:extra-main-files
  {:devcards {:main cards.core}
   :testing {:main example.test-runner}}
   :auto-testing true}
{:output-to "resources/public/cljs-out/dev-main.js"
 :closure-defines {example.api/url ""}
 :optimizations :none
 :pretty-print true
 ;:auto-testing true
 :source-map true
 :source-map-timestamp true
 :devcards true
 :main example.core}

oly 2020-07-30T15:41:56.206200Z

{:deps {org.clojure/clojure {:mvn/version "1.10.0"}
        org.clojure/clojurescript {:mvn/version "1.10.597"}
        reagent {:mvn/version "0.8.1"}
        reagent-utils {:mvn/version "0.3.3"}
        cljs-ajax {:mvn/version "0.8.0"}
        pez/clerk {:mvn/version "1.0.0"}
        metosin/reitit {:mvn/version "0.3.1"}
        tick {:mvn/version "0.4.23-alpha"}

        olical/cljs-test-runner {:mvn/version "3.7.0"}
        org.clojure/test.check {:mvn/version "0.10.0"}

        venantius/accountant {:mvn/version "0.2.4"}
        com.bhauman/figwheel-main {:mvn/version "0.2.11"}
        cider/piggieback {:mvn/version "0.5.0"}
        devcards {:mvn/version "0.2.7"}
        com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}
        machtfit/reagent-quill {:mvn/version "1.0.0-SNAPSHOT"}}
 :paths ["test/cljs" "resources" "cards" "src/cljs"]}

oly 2020-07-30T15:42:24.206700Z

spent half the day looking at this and pulling my hair out 😕

oly 2020-07-30T16:00:51.207200Z

Uncaught Error: goog.require could not find: cljs.example.test_runner that's the error i tend to see in the js console

bhauman 2020-07-30T18:49:05.208200Z

@oliver.marks are files getting put into the “target” directory?

ozzloy 2020-07-30T18:58:29.211400Z

how do i get vars from .cljc files in .cljs? i have src/foo.clj{s,c} 1. i have foo.cljc with (defn add [a b] (+ a b)) 2. i drop into figwheel.main repl and (require '[foo :as f]) 3. (f/add 1 2) ;; => WARNING: Use of undeclared Var f/add

ozzloy 2020-07-30T18:59:59.212500Z

foo.cljs just has (ns foo), and foo.cljc has (ns foo) as well. what am i doing wrong?

ozzloy 2020-07-30T19:25:41.214200Z

@oliver.marks i see :paths has "test/cljs" and goog.require could not find cljs.example.test_runner, does your file structure have test/cljs/cljs/example/test_runner.cljs?

ozzloy 2020-07-30T19:28:06.215900Z

also, does the namespace have "cljs" at the beginning? egs: (ns cljs.example.test_runner) or similar at the top of the cljs files?