Fork me on GitHub
#shadow-cljs
<
2019-01-04
>
metacritical09:01:32

There is some issue with “self-hosting”, I tried this example https://github.com/mhuebert/shadow-bootstrap-example Bootstrap build fails.

thheller11:01:37

ah got it. will check it out soon

metacritical13:01:32

@thheller Thanks, if you solve this issue i wont have to change my build to project.clj

thheller17:01:45

@metacritical should be fixed in 2.7.10

metacritical17:01:55

@thheller Is that gonna take a while? Because i am developing a Shadow-cljs + Electron App where i need clojurescript hosting in the front end.

metacritical17:01:19

Can you give a quick fix for now?

thheller17:01:07

it is fixed right now?

❤️ 10
metacritical17:01:02

So self hosting works in shadow-cljs ?

lilactown17:01:35

Can you try the new version and confirm?

metacritical17:01:49

OK Thanks! will do now.

thheller17:01:25

the example above should be working now yes.

thheller17:01:46

shadow-cljs itself is not self-hosted though. it can only build builds that use self-hosted features 😉

metacritical17:01:54

🙂 I understand shadow-cljs is not self hosted, my understanding is the way it compiles cljs is a bit different than say cljs build api or lein cljs-build. Lumo’s build Api doesnt even support self-hosting builds.

thheller17:01:04

yeah self-hosted builds require a few extra steps which shadow-cljs takes care of

metacritical17:01:03

OK so this is what i did

metacritical18:01:04

The error in console : Download the React DevTools for a better development experience: https://fb.me/react-devtoolsYou might need to use a local HTTP server (instead of file://): https://fb.me/react-devtools-faq core.cljs:196 WARNING: Use of undeclared Var cljs.user/+ (anonymous) @ core.cljs:196 cljs$core$string_print @ core.cljs:9899 cljs$core$pr_with_opts @ core.cljs:10062 cljs.core.println.cljs$core$IFn$_invoke$arity$variadic @ core.cljs:10105 cljs$analyzer$default_warning_handler @ analyzer.cljc:510 cljs$analyzer$warning @ analyzer.cljc:712 cljs.analyzer.confirm_var_exist_warning @ analyzer.cljc:751 cljs.analyzer.confirm_var_exists.cljs$core$IFn$_invoke$arity$4 @ analyzer.cljc:816 cljs.analyzer.confirm_var_exists.cljs$core$IFn$_invoke$arity$3 @ analyzer.cljc:801 cljs.analyzer.resolve_var.cljs$core$IFn$_invoke$arity$3 @ analyzer.cljc:1184 cljs$analyzer$resolve_existing_var @ analyzer.cljc:1195 cljs$analyzer$analyze_symbol @ analyzer.cljc:3443 cljs$analyzer$analyze_form @ analyzer.cljc:3832 cljs$analyzer$analyze_STAR_ @ analyzer.cljc:3860 cljs.analyzer.analyze.cljs$core$IFn$_invoke$arity$4 @ analyzer.cljc:3880 cljs.analyzer.analyze.cljs$core$IFn$_invoke$arity$3 @ analyzer.cljc:3875 cljs.analyzer.analyze.cljs$core$IFn$_invoke$arity$2 @ analyzer.cljc:3871 cljs$analyzer$parse_invoke_STAR_ @ analyzer.cljc:3325 cljs$analyzer$parse_invoke @ analyzer.cljc:3380 cljs$analyzer$analyze_seq_STAR_ @ analyzer.cljc:3601 cljs$analyzer$analyze_seq_STAR__wrap @ analyzer.cljc:3605 cljs.analyzer.analyze_seq.cljs$core$IFn$_invoke$arity$4 @ analyzer.cljc:3629 cljs$analyzer$analyze_form @ analyzer.cljc:3833 cljs$analyzer$analyze_STAR_ @ analyzer.cljc:3860 cljs.analyzer.analyze.cljs$core$IFn$_invoke$arity$4 @ analyzer.cljc:3880 (anonymous) @ js.cljs:813 cljs$js$eval_STAR_ @ js.cljs:817 cljs.js.eval.cljs$core$IFn$_invoke$arity$4 @ js.cljs:894 app$renderer$core$eval_exp @ core.cljs:14 app$renderer$core$evaluate @ core.cljs:21 app$renderer$core$init_BANG_ @ core.cljs:29 (anonymous) @ core.cljs:31 VM269:1 Uncaught TypeError: Cannot read property ‘call’ of undefined at eval (eval at cljs$js$js_eval (js.cljs:124), <anonymous>:1:18) at cljs$js$js_eval (js.cljs:124) at Object.cljs$js$eval_STAR_ [as eval_STAR_] (js.cljs:842) at Function.cljs.js.eval.cljs$core$IFn$_invoke$arity$4 (js.cljs:894) at http://Object.app$renderer$core$eval_exp [as eval_exp] (core.cljs:14) at http://Object.app$renderer$core$evaluate [as evaluate] (core.cljs:21) at http://Object.app$rend

thheller18:01:43

you need to call the bootstrap stuff

thheller18:01:49

(defn start []
  (boot/init compile-state-ref
    {:path "/bootstrap"}
    compile-it))

metacritical18:01:56

Aha thanks a lot @thheller, i think this would work.

metacritical18:01:50

It Works! Thanks a lot @thheller