Since HelloWorld worked for me, I tried to output the command line
arguments as a string. Consequently, the program now looks like:
(ns cljshello.core
(:require [cljs.nodejs :as nj]))
(defn -main [& argv]
(println (str "Hello, World!" (.-argv nj/process) "\n")))
(set! *main-cli-fn* -main)
Again, I am able to compile with either leiningen or the command line with
the same result. This time, I'm getting:
/Users/pag/src/test/clj/cljshello/pp.js:350
cljs.core.apply=function(){var a=null,b=function(a,b){var
c=a.cljs$lang$maxFix
^
TypeError: Cannot read property 'cljs$lang$maxFixedArity' of null
at cljs.core.apply.b (/Users/pag/src/test/clj/cljshello/pp.js:350:62)
at cljs.core.apply.a (/Users/pag/src/test/clj/cljshello/pp.js:354:118)
at Object.<anonymous> (/Users/pag/src/test/clj/cljshello/pp.js:926:421)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
Since I should already have argv being passed in, I changed the expression
to use it directly, instead of using (.-argv nj/process), however, this
changed nothing.
Happy to try any suggestions you may have for me.
Paul
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en