I create a template with lein mies, and then add the node target definition 
(project.clj below).   However, I get a missing goog variable.  I had 
understood that the node bootstrap would be injected into the compiled js file 
so stuff just worked.  Am I missing something?  I use cljsbuild auto and then 
run node <filename>.js

Ivn
----

error: 
(function (exports, require, module, __filename, __dirname) { goog.addDependen
                                                              ^
ReferenceError: goog is not defined
    at Object.<anonymous> (C:\Users\ila\workspace\nodecljs\nodecljs.js:1:63)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3

project.clj:
(defproject nodecljs "0.1.0-SNAPSHOT"
  :description "FIXME: write this!"
  :url "http://example.com/FIXME";

  :dependencies [[org.clojure/clojure "1.6.0"]
                 [org.clojure/clojurescript "0.0-2311"]]

  :plugins [[lein-cljsbuild "1.0.4-SNAPSHOT"]]

  :source-paths ["src"]

  :cljsbuild {
    :builds [{:id "nodecljs"
              :source-paths ["src"]
              :compiler {:output-to "nodecljs.js"
                         :output-dir "out"
                         :optimizations :none
                         :target :nodejs
                         :source-map true}}]})

output of nodecljs.js
goog.addDependency("base.js", ['goog'], []);
goog.addDependency("../cljs/core.js", ['cljs.core'], ['goog.string', 
'goog.object', 'goog.string.StringBuffer', 'goog.array']);
goog.addDependency("../smMVO.js", ['cljs.nodejs'], ['cljs.core']);
goog.addDependency("../nodecljs/core.js", ['nodecljs.core'], ['cljs.core', 
'cljs.nodejs']);
goog.addDependency("../cljs_helloworld/core.js", ['cljs_helloworld.core'], 
['cljs.core']);
goog.addDependency("../3xKyH.js", ['cljs.nodejscli'], ['cljs.core', 
'cljs.nodejs', 'cljs.nodejs']);

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to