/build-advanced.clj Secret
Last active
January 2, 2016 00:08
Star
You must be signed in to star a gist
NPE when building cljs in advanced mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'cljs.build.api) | |
(cljs.build.api/build "." {:output-to "out/main.js" | |
:optimizations :advanced}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'cljs.build.api) | |
(cljs.build.api/build "." {:output-to "out/main.js" | |
:optimizations :none}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:foreign-libs | |
[{:file "i-dont-exist.js" | |
:provides ["nope"]}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns main | |
(:require [nope])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> java -cp ~/Downloads/cljs.jar:. clojure.main build-none.clj | |
WARNING: main is a single segment namespace at line 1 ./main.cljs | |
Exception in thread "main" java.io.FileNotFoundException: /Users/glen/Development/Misc/cljs-deps-npe/i-dont-exist.js (No such file or directory), compiling:(/Users/glen/Development/Misc/cljs-deps-npe/build-none.clj:3:1) | |
at clojure.lang.Compiler.load(Compiler.java:7239) | |
at clojure.lang.Compiler.loadFile(Compiler.java:7165) | |
at clojure.main$load_script.invoke(main.clj:275) | |
at clojure.main$script_opt.invoke(main.clj:337) | |
at clojure.main$main.doInvoke(main.clj:421) | |
at clojure.lang.RestFn.invoke(RestFn.java:408) | |
at clojure.lang.Var.invoke(Var.java:379) | |
at clojure.lang.AFn.applyToHelper(AFn.java:154) | |
at clojure.lang.Var.applyTo(Var.java:700) | |
at clojure.main.main(main.java:37) | |
Caused by: java.io.FileNotFoundException: /Users/glen/Development/Misc/cljs-deps-npe/i-dont-exist.js (No such file or directory) | |
at java.io.FileInputStream.open0(Native Method) | |
at java.io.FileInputStream.open(FileInputStream.java:195) | |
at java.io.FileInputStream.<init>(FileInputStream.java:138) | |
at clojure.java.io$fn__9193.invoke(io.clj:238) | |
at clojure.java.io$fn__9102$G__9095__9109.invoke(io.clj:69) | |
at clojure.java.io$fn__9163.invoke(io.clj:165) | |
at clojure.java.io$fn__9115$G__9091__9122.invoke(io.clj:69) | |
at clojure.java.io$reader.doInvoke(io.clj:102) | |
at clojure.lang.RestFn.invoke(RestFn.java:410) | |
at cljs.closure$fn__3599.invoke(closure.clj:330) | |
at cljs.js_deps$fn__152$G__114__157.invoke(js_deps.cljc:111) | |
at cljs.closure$write_javascript.invoke(closure.clj:1477) | |
at cljs.closure$source_on_disk.invoke(closure.clj:1500) | |
at cljs.closure$output_unoptimized$fn__4065.invoke(closure.clj:1534) | |
at clojure.core$map$fn__4553.invoke(core.clj:2624) | |
at clojure.lang.LazySeq.sval(LazySeq.java:40) | |
at clojure.lang.LazySeq.seq(LazySeq.java:49) | |
at clojure.lang.RT.seq(RT.java:507) | |
at clojure.core$seq__4128.invoke(core.clj:137) | |
at clojure.core$filter$fn__4580.invoke(core.clj:2679) | |
at clojure.lang.LazySeq.sval(LazySeq.java:40) | |
at clojure.lang.LazySeq.seq(LazySeq.java:49) | |
at clojure.lang.RT.seq(RT.java:507) | |
at clojure.core$seq__4128.invoke(core.clj:137) | |
at clojure.core$map$fn__4553.invoke(core.clj:2616) | |
at clojure.lang.LazySeq.sval(LazySeq.java:40) | |
at clojure.lang.LazySeq.seq(LazySeq.java:49) | |
at clojure.lang.Cons.next(Cons.java:39) | |
at clojure.lang.RT.boundedLength(RT.java:1735) | |
at clojure.lang.RestFn.applyTo(RestFn.java:130) | |
at clojure.core$apply.invoke(core.clj:630) | |
at cljs.closure$deps_file.invoke(closure.clj:1226) | |
at cljs.closure$output_deps_file.invoke(closure.clj:1246) | |
at cljs.closure$output_unoptimized.doInvoke(closure.clj:1548) | |
at clojure.lang.RestFn.applyTo(RestFn.java:139) | |
at clojure.core$apply.invoke(core.clj:632) | |
at cljs.closure$build.invoke(closure.clj:1844) | |
at cljs.build.api$build.invoke(api.clj:207) | |
at cljs.build.api$build.invoke(api.clj:201) | |
at user$eval3.invoke(build-none.clj:3) | |
at clojure.lang.Compiler.eval(Compiler.java:6782) | |
at clojure.lang.Compiler.load(Compiler.java:7227) | |
... 9 more | |
> java -cp ~/Downloads/cljs.jar:. clojure.main build-advanced.clj | |
WARNING: main is a single segment namespace at line 1 ./main.cljs | |
Exception in thread "main" java.lang.IllegalArgumentException: No implementation of method: :make-reader of protocol: #'clojure.java.io/IOFactory found for class: nil, compiling:(/Users/glen/Development/Misc/cljs-deps-npe/build-advanced.clj:3:1) | |
at clojure.lang.Compiler.load(Compiler.java:7239) | |
at clojure.lang.Compiler.loadFile(Compiler.java:7165) | |
at clojure.main$load_script.invoke(main.clj:275) | |
at clojure.main$script_opt.invoke(main.clj:337) | |
at clojure.main$main.doInvoke(main.clj:421) | |
at clojure.lang.RestFn.invoke(RestFn.java:408) | |
at clojure.lang.Var.invoke(Var.java:379) | |
at clojure.lang.AFn.applyToHelper(AFn.java:154) | |
at clojure.lang.Var.applyTo(Var.java:700) | |
at clojure.main.main(main.java:37) | |
Caused by: java.lang.IllegalArgumentException: No implementation of method: :make-reader of protocol: #'clojure.java.io/IOFactory found for class: nil | |
at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:554) | |
at clojure.java.io$fn__9115$G__9091__9122.invoke(io.clj:69) | |
at clojure.java.io$reader.doInvoke(io.clj:102) | |
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.invoke(core.clj:632) | |
at clojure.core$slurp.doInvoke(core.clj:6653) | |
at clojure.lang.RestFn.invoke(RestFn.java:410) | |
at cljs.closure$foreign_deps_str$to_js_str__4073.invoke(closure.clj:1588) | |
at clojure.core$map$fn__4553.invoke(core.clj:2624) | |
at clojure.lang.LazySeq.sval(LazySeq.java:40) | |
at clojure.lang.LazySeq.seq(LazySeq.java:49) | |
at clojure.lang.LazySeq.first(LazySeq.java:71) | |
at clojure.lang.RT.first(RT.java:653) | |
at clojure.core$first__4110.invoke(core.clj:55) | |
at clojure.string$join.invoke(string.clj:185) | |
at cljs.closure$foreign_deps_str.invoke(closure.clj:1589) | |
at cljs.closure$build.invoke(closure.clj:1829) | |
at cljs.build.api$build.invoke(api.clj:207) | |
at cljs.build.api$build.invoke(api.clj:201) | |
at user$eval3.invoke(build-advanced.clj:3) | |
at clojure.lang.Compiler.eval(Compiler.java:6782) | |
at clojure.lang.Compiler.load(Compiler.java:7227) | |
... 9 more |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment