I follow the Clojurescript QuickStart on Window 7 and stuck with the final point - run with Leiningen.
Simple command:
lein run -m clojure.main repl.clj
returns error with enormous stacktrace which starts so:
clojure.lang.Compiler$CompilerException: java.io.FileNotFoundException: Could not locate cljs/repl__init.class or cljs/repl.clj on classpath: , compiling:(X:\n\code\hello_world\repl.clj:1:1)
I've search the web and found nearest case, but I've just copied whole code from the site, so I believe there is no typo.
What am I missing?
repl.clj:
(require 'cljs.repl)
(require 'cljs.build.api)
(require 'cljs.repl.browser)
(cljs.build.api/build "src"
{:main 'hello-world.core
:output-to "out/main.js"
:browser-repl true
:verbose true})
(cljs.repl/repl (cljs.repl.browser/repl-env)
:watch "src"
:output-dir "out")
Update:
I've created project 'hw' with lein, copied repl.clj to the project root directory as well as cljs.jar. Also I've copied cljs.jar to src directory (it was mentioned in the quick start guide that src goes to classpath automatically), but result is the same.
project.clj:
(defproject hw "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]]
:main ^:skip-aot hw.core
:target-path "target/%s"
:profiles {:uberjar {:aot :all}})
Update 2
Also no luck even with adding clojurescript as dependency:
(defproject hw "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "1.7.170"]
]
:main ^:skip-aot hw.core
:target-path "target/%s"
:profiles {:uberjar {:aot :all}})
Putting cljs.jar to lib directory didn't help either.
https://youtu.be/ciCQ_Nkis4I