Clojurescript libraries - goog.require could not be found

New to clojurescript and working on the "Modern CLJS" tutorial here .

He instructs to insert domina by adding it to project.clj:

:dependencies [[org.clojure/clojure "1.4.0"]
               [compojure "1.1.5"]
               [domina "1.0.0"]]

And then use it in your script, specifying it in the form ns

(ns cljstut.login
  (:use [domina :only [by-id value]]))

However, when I actually run this in a browser, I see the following in the console log.

goog.require could not find: domina

I think I missed some kind of declaration somewhere? But like new, the whole assembly process is pretty opaque. Any troubleshooting tips are greatly appreciated.

+5
source share
6 answers

The dependencies in your file project.cljand declarations of your namespace look great.

clojurescript lein cljsbuild auto, . , .

lein cljsbuild auto, lein deps - ​​ .

+3

, , project.clj lein clean lein cljsbuild clean.

+3

cljs libs lein. 7- . , domina 1.0.2-SNAPSHOT project.cljs: lein-cljsbuild 0.3.0 project.cljs: .

Mimmo

+1

, :

goog.require : domina

( "j" modern-cljs):

(ns modern-cls.login
  (:use [domina :only [by-id value]]))

, . , , - :)

+1

" CLJS". "domina" : plugins project.clj, .

0

, index.html.

:

<script src="js/expanding_gases.js" type="text/javascript"></script>
<script type="text/javascript">goog.require("expanding_gases.flow_gases");</script>

:

<script type="text/javascript">goog.require("expanding_gases.flow_gases");</script>
<script src="js/expanding_gases.js" type="text/javascript"></script>

By the way, good messages for understanding goog messages are here: https://github.com/clojure/clojurescript/wiki/Quick-Start

0
source

All Articles