mhuebert / re-frame-live

1 stars 0 forks source link

compiling following instructions fails #1

Open nrfm opened 6 years ago

nrfm commented 6 years ago

Hi, Matt,

I tried with no luck to run this example by following the instructions in the readme.

So I upgraded to [cljs-live "0.2.1-SNAPSHOT"] as in the cljs-live example and followed the instructions.

After running

lein run -m cljs-live.bundle/main live-deps.clj

I am getting this error

"Compile..."
"Elapsed time: 52571.163679 msecs"
"Make opts..."
"Elapsed time: 0.322763 msecs"
Exception in thread "main" java.io.FileNotFoundException: /cljs.core.json (Permission denied), compiling:(/private/var/folders/lh/pcjj5yzn2jv2zr1r1yhl3my80000gn/T/form-init1756643597559933736.clj:1:125)
        at clojure.lang.Compiler.load(Compiler.java:7441)
        at clojure.lang.Compiler.loadFile(Compiler.java:7367)
        at clojure.main$load_script.invokeStatic(main.clj:277)
        at clojure.main$init_opt.invokeStatic(main.clj:279)
        at clojure.main$init_opt.invoke(main.clj:279)
        at clojure.main$initialize.invokeStatic(main.clj:310)
        at clojure.main$null_opt.invokeStatic(main.clj:344)
        at clojure.main$null_opt.invoke(main.clj:341)
        at clojure.main$main.invokeStatic(main.clj:423)
        at clojure.main$main.doInvoke(main.clj:386)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.lang.Var.applyTo(Var.java:702)
        at clojure.main.main(main.java:37)
Caused by: java.io.FileNotFoundException: /cljs.core.json (Permission denied)
        at java.io.FileOutputStream.open0(Native Method)
        at java.io.FileOutputStream.open(FileOutputStream.java:270)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
        at clojure.java.io$fn__12233.invokeStatic(io.clj:230)
        at clojure.java.io$fn__12233.invoke(io.clj:230)
        at clojure.java.io$fn__12170$G__12139__12177.invoke(io.clj:69)
        at clojure.java.io$fn__12245.invokeStatic(io.clj:263)
        at clojure.java.io$fn__12245.invoke(io.clj:259)
        at clojure.java.io$fn__12170$G__12139__12177.invoke(io.clj:69)
        at clojure.java.io$fn__12207.invokeStatic(io.clj:166)
        at clojure.java.io$fn__12207.invoke(io.clj:166)
        at clojure.java.io$fn__12183$G__12135__12190.invoke(io.clj:69)
        at clojure.java.io$writer.invokeStatic(io.clj:119)
        at clojure.java.io$writer.doInvoke(io.clj:104)
        at clojure.lang.RestFn.invoke(RestFn.java:410)
        at clojure.lang.AFn.applyToHelper(AFn.java:154)
        at clojure.lang.RestFn.applyTo(RestFn.java:132)
        at clojure.core$apply.invokeStatic(core.clj:659)
        at clojure.core$spit.invokeStatic(core.clj:6829)
        at clojure.core$spit.doInvoke(core.clj:6829)
        at clojure.lang.RestFn.invoke(RestFn.java:425)
        at cljs_live.bundle$main.invokeStatic(bundle.clj:321)
        at cljs_live.bundle$main.invoke(bundle.clj:281)
        at clojure.lang.Var.invoke(Var.java:381)
        at user$eval1600.invokeStatic(form-init1756643597559933736.clj:1)
        at user$eval1600.invoke(form-init1756643597559933736.clj:1)
        at clojure.lang.Compiler.eval(Compiler.java:6977)
        at clojure.lang.Compiler.eval(Compiler.java:6967)
        at clojure.lang.Compiler.load(Compiler.java:7429)
        ... 12 more

So I upgraded to the latest version on clojars [cljs-live "0.2.9"] and I am getting this one :)

Can't find 'cljs-live.bundle/main' as .class or .clj for lein run: please check the spelling.
Exception in thread "main" java.io.FileNotFoundException: Could not locate cljs_live/bundle__init.class or cljs_live/bundle.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name., compiling:(/private/var/folders/lh/pcjj5yzn2jv2zr1r1yhl3my80000gn/T/form-init1493237248971964466.clj:1:125)
        at clojure.lang.Compiler.load(Compiler.java:7441)
        at clojure.lang.Compiler.loadFile(Compiler.java:7367)
        at clojure.main$load_script.invokeStatic(main.clj:277)
        at clojure.main$init_opt.invokeStatic(main.clj:279)
        at clojure.main$init_opt.invoke(main.clj:279)
        at clojure.main$initialize.invokeStatic(main.clj:310)
        at clojure.main$null_opt.invokeStatic(main.clj:344)
        at clojure.main$null_opt.invoke(main.clj:341)
        at clojure.main$main.invokeStatic(main.clj:423)
        at clojure.main$main.doInvoke(main.clj:386)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.lang.Var.applyTo(Var.java:702)
        at clojure.main.main(main.java:37)
Caused by: java.io.FileNotFoundException: Could not locate cljs_live/bundle__init.class or cljs_live/bundle.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
        at clojure.lang.RT.load(RT.java:458)
        at clojure.lang.RT.load(RT.java:421)
        at clojure.core$load$fn__7831.invoke(core.clj:6008)
        at clojure.core$load.invokeStatic(core.clj:6007)
        at clojure.core$load.doInvoke(core.clj:5991)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invokeStatic(core.clj:5812)
        at clojure.core$load_one.invoke(core.clj:5807)
        at clojure.core$load_lib$fn__7776.invoke(core.clj:5852)
        at clojure.core$load_lib.invokeStatic(core.clj:5851)
        at clojure.core$load_lib.doInvoke(core.clj:5832)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invokeStatic(core.clj:659)
        at clojure.core$load_libs.invokeStatic(core.clj:5889)
        at clojure.core$load_libs.doInvoke(core.clj:5873)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invokeStatic(core.clj:659)
        at clojure.core$require.invokeStatic(core.clj:5911)
        at clojure.core$require.doInvoke(core.clj:5911)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at user$eval1600$fn__1604.invoke(form-init1493237248971964466.clj:1)
        at user$eval1600.invokeStatic(form-init1493237248971964466.clj:1)
        at user$eval1600.invoke(form-init1493237248971964466.clj:1)
        at clojure.lang.Compiler.eval(Compiler.java:6977)
        at clojure.lang.Compiler.eval(Compiler.java:6967)
        at clojure.lang.Compiler.load(Compiler.java:7429)
        ... 12 more

Could you show a quick up to date example of how to compile the deps?

Thanks for a great project!

mhuebert commented 6 years ago

Hi @nrfm, thanks for writing!

Sorry about that, I am actually in the process of deprecating the whole build aspect of cljs-live because @thheller has just added bootstrap support to shadow-cljs. Shadow-cljs is an alternative to cljs-build/figwheel etc., it is still alpha but progressing rapidly and the only build tool that has proper support for self-host usage. (it is also much faster and better than the rather hacky stuff I had to do to get cljs-live to work.)

I have created a sample project here: https://github.com/mhuebert/shadow-bootstrap-example

I will update this readme now to reflect the change.

nrfm commented 6 years ago

that was quick!! :) Viele Danke, gonna check it out!

thheller commented 6 years ago

I also wrote something about the support here: https://code.thheller.com/blog/shadow-cljs/2017/10/14/bootstrap-support.html

nrfm commented 6 years ago

thanks @thheller!