Fork me on GitHub
#figwheel-main
<
2018-11-10
>
genRaiy01:11:05

@bhauman WARNING: preload namespace figwheel.core does not exist

genRaiy01:11:38

is only seen on compile errors today (maybe I had some stuff in memory)

genRaiy01:11:49

so I guess it’s not an issue

miridius14:11:01

Hi all. When I run -bo with leiningen and my build fails, it's still returning a 0 as the exit code. Is that a known issue or is there a way I can fix it? I'm running: lein trampoline run -m figwheel.main -- -bo client and client.cljs.edn looks like: {:main my.company.client.main}

miridius14:11:32

Also weirdly sometimes the whole compilation runs twice. Here's my full output:

$ lein trampoline run -m figwheel.main -- -bo client
[Figwheel] Compiling build client to "target/public/cljs-out/client-main.js"
[Figwheel] Failed to compile build client in 6.094 seconds.
[Figwheel] Compile Exception   /project/path/src/my/company/client/main.cljs   line:4  column:14

  No such namespace: my.company.ui.external, could not locate my/company/ui/external.cljs, my/company/ui/external.cljc, or JavaScript source providing "my.company.ui.external" in file /project/path/src/my/company/client/main.cljs

  1  (ns my.company.client.main
  2    (:require [my.company.client.core :as client]
  3              [fulcro.client :as core]
  4              [my.company.ui.external :as ui]))
                  ^---
  5  
  6  ; This is the production entry point. In dev mode, we do not require this file at all, and instead mount (and
  7  ; hot code reload refresh) from cljs/user.cljs
  8  (reset! client/app (core/mount @client/app ui/Root "app"))

[Figwheel:SEVERE] clojure.lang.ExceptionInfo: No such namespace: my.company.ui.external, could not locate my/company/ui/external.cljs, my/company/ui/external.cljc, or JavaScript source providing "my.company.ui.external" in file /project/path/src/my/company/client/main.cljs
[Figwheel] Compiling build client to "target/public/cljs-out/client-main.js"
[Figwheel] Failed to compile build client in 0.416 seconds.
[Figwheel] Compile Exception   /project/path/src/my/company/client/main.cljs   line:4  column:14

  No such namespace: my.company.ui.external, could not locate my/company/ui/external.cljs, my/company/ui/external.cljc, or JavaScript source providing "my.company.ui.external" in file /project/path/src/my/company/client/main.cljs

  1  (ns my.company.client.main
  2    (:require [my.company.client.core :as client]
  3              [fulcro.client :as core]
  4              [my.company.ui.external :as ui]))
                  ^---
  5  
  6  ; This is the production entry point. In dev mode, we do not require this file at all, and instead mount (and
  7  ; hot code reload refresh) from cljs/user.cljs
  8  (reset! client/app (core/mount @client/app ui/Root "app"))

[Figwheel:SEVERE] clojure.lang.ExceptionInfo: No such namespace: my.company.ui.external, could not locate my/company/ui/external.cljs, my/company/ui/external.cljc, or JavaScript source providing "my.company.ui.external" in file /project/path/src/my/company/client/main.cljs

$ echo $?
0

miridius14:11:51

Ah the running twice seems to be caused by me aliasing lein compile to the same command, if I remove that it only runs once. It still exits with 0 though 😞

miridius14:11:17

I just checked and I get the same result with clj. figwheel-main version is 0.1.9

bhauman16:11:14

@miridius yes this is more than likely a bug

bhauman16:11:22

or really me trying to balance meaningful output versus long stack traces

bhauman17:11:34

@miridius just pushed a commit to fix this