[ClojureScript] Re: Trying to get "how to use Clojurescript in node.js" to work

2017-06-16 Thread Jose Figueroa Martinez
Hello,

the directory *hello_world/*
.
├── cljs.jar
├── node.clj
└── src
└── hello_world
└── core.cljs


in this directory (where the node.clj file is) just execute:
java -cp "cljs.jar;src" clojure.main node.clj

and then:
node main.js

That is.

Saludos!

El jueves, 15 de junio de 2017, 18:34:22 (UTC-5), Mike Frederick escribió:
>
> All,
>
> It seems like I have setup/built everything correctly, but I cannot get 
> the tutorial given at https://clojurescript.org/guides/quick-start to 
> work...
>
> here is the file *src\hello-world\core.cljs*
>
> (ns hello-world.core
>   (:require [cljs.nodejs :as nodejs]))
>
> (nodejs/enable-util-print!)
>
> (defn -main [& args]
>   (println "Hello world!"))
>
> (set! *main-cli-fn* -main)
>
> and here is the file *src\hello-world\node.clj*
>
> (require 'cljs.build.api)
> (cljs.build.api/build "src"
>  {:main 'hello-world.core
>  :output-to "main.js"
>  :target :nodejs})
>
>>
>>
> These look to be exactly as listed at the tutorial web site. Yes, I am 
> using a Windows system. I compile this with:
>
> C:\Users\Michael\Documents\src\hello-world>java -cp "cljs.jar;src" clojure
> .main node.clj
>
> and get no messages. Then I type:
>
> C:\Users\Michael\Documents\src\hello-world>node main.js
> goog.require could not find: hello_world.core
>
> C:\Users\Michael\Documents\src\hello-world\out\goog\base.js:681
> throw Error(errorMessage);
>   ^
> Error: goog.require could not find: hello_world.core
> at Error (native)
> at Object.goog.require (C:\Users\Michael\Documents\src\hello-world\out
> \goog\base.js:681:11)
> at Object. (C:\Users\Michael\Documents\src\hello-world\main
> .js:22:6)
> at Module._compile (module.js:570:32)
> at Object.Module._extensions..js (module.js:579:10)
> at Module.load (module.js:487:32)
> at tryModuleLoad (module.js:446:12)
> at Function.Module._load (module.js:438:3)
> at Module.runMain (module.js:604:10)
> at run (bootstrap_node.js:394:7)
>
> Can anyone help me get this running? TIA
>

-- 
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 clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.


[ClojureScript] Re: Trying to get "how to use Clojurescript in node.js" to work

2017-06-16 Thread Thomas Heller
.
├── build.clj
├── cljs.jar
└── src
└── hello_world
└── core.cljs

Forgot the build.clj.

On Friday, June 16, 2017 at 9:05:14 PM UTC+2, Thomas Heller wrote:
>
> ├── cljs.jar
> └── src
> └── hello_world
> └── core.cljs
>
>
> This is the structure you should have. Its a bit confusing since you have 
> src\hello_world\src.
>
>
>
>
>
>
>

-- 
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 clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.


[ClojureScript] Re: Trying to get "how to use Clojurescript in node.js" to work

2017-06-16 Thread Thomas Heller
├── cljs.jar
└── src
└── hello_world
└── core.cljs


This is the structure you should have. Its a bit confusing since you have 
src\hello_world\src.






-- 
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 clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.


[ClojureScript] Re: Trying to get "how to use Clojurescript in node.js" to work

2017-06-16 Thread Mike Frederick


There is only 1 item in the set of files name *hello_world:*





On Friday, June 16, 2017 at 9:35:40 AM UTC-5, Jose Figueroa Martinez wrote:
>
> Hello,
>
> try renaming your *src/hello-world/* to *src/hello_world/*
>
> I think you renamed the project folder, not the source folder in *src/*.
>
> Saludos!
>
>
> El viernes, 16 de junio de 2017, 9:12:38 (UTC-5), Mike Frederick escribió:
>>
>> OK, I did that, re-ran the compile and execution commands, and got a 
>> similar result:
>>
>> C:\Users\Michael\Documents\src\hello-world>cd ..
>>
>> C:\Users\Michael\Documents\src>cd hello_world
>>
>> C:\Users\Michael\Documents\src\hello_world>java -cp "cljs.jar;src" 
>> clojure.main node.clj
>>
>> C:\Users\Michael\Documents\src\hello_world>node main.js
>> goog.require could not find: hello_world.core
>>
>> C:\Users\Michael\Documents\src\hello_world\out\goog\base.js:681
>> throw Error(errorMessage);
>>   ^
>> Error: goog.require could not find: hello_world.core
>> at Error (native)
>> at Object.goog.require (C:\Users\Michael\Documents\src\hello_world\
>> out\goog\base.js:681:11)
>> at Object. (C:\Users\Michael\Documents\src\hello_world\
>> main.js:22:6)
>> at Module._compile (module.js:570:32)
>> at Object.Module._extensions..js (module.js:579:10)
>> at Module.load (module.js:487:32)
>> at tryModuleLoad (module.js:446:12)
>> at Function.Module._load (module.js:438:3)
>> at Module.runMain (module.js:604:10)
>> at run (bootstrap_node.js:394:7)
>>
>>
>> On Friday, June 16, 2017 at 7:26:16 AM UTC-5, Chris Perkins wrote:
>>>
>>> Try renaming your "hello-world" directory to "hello_world".
>>>
>>> See: 
>>> https://stackoverflow.com/questions/4420944/why-does-clojure-convert-dashes-in-names-to-underscores-in-the-filesystem
>>>
>>> On Thursday, June 15, 2017 at 5:34:22 PM UTC-6, Mike Frederick wrote:

 All,

 It seems like I have setup/built everything correctly, but I cannot get 
 the tutorial given at https://clojurescript.org/guides/quick-start to 
 work...

 here is the file *src\hello-world\core.cljs*

 (ns hello-world.core
   (:require [cljs.nodejs :as nodejs]))

 (nodejs/enable-util-print!)

 (defn -main [& args]
   (println "Hello world!"))

 (set! *main-cli-fn* -main)

 and here is the file *src\hello-world\node.clj*

 (require 'cljs.build.api)
 (cljs.build.api/build "src"
  {:main 'hello-world.core
  :output-to "main.js"
  :target :nodejs})

>
>
 These look to be exactly as listed at the tutorial web site. Yes, I am 
 using a Windows system. I compile this with:

 C:\Users\Michael\Documents\src\hello-world>java -cp "cljs.jar;src" 
 clojure.main node.clj

 and get no messages. Then I type:

 C:\Users\Michael\Documents\src\hello-world>node main.js
 goog.require could not find: hello_world.core

 C:\Users\Michael\Documents\src\hello-world\out\goog\base.js:681
 throw Error(errorMessage);
   ^
 Error: goog.require could not find: hello_world.core
 at Error (native)
 at Object.goog.require (C:\Users\Michael\Documents\src\hello-world\
 out\goog\base.js:681:11)
 at Object. (C:\Users\Michael\Documents\src\hello-world\
 main.js:22:6)
 at Module._compile (module.js:570:32)
 at Object.Module._extensions..js (module.js:579:10)
 at Module.load (module.js:487:32)
 at tryModuleLoad (module.js:446:12)
 at Function.Module._load (module.js:438:3)
 at Module.runMain (module.js:604:10)
 at run (bootstrap_node.js:394:7)

 Can anyone help me get this running? TIA

>>>

-- 
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 clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.


[ClojureScript] Re: Trying to get "how to use Clojurescript in node.js" to work

2017-06-16 Thread Mike Frederick
Here is the result of trying that:

C:\Users\Michael\Documents\src\hello_world>cd ..\..

C:\Users\Michael\Documents>java -cp "cljs.jar;src" clojure.main node.clj
Error: Could not find or load main class clojure.main


On Friday, June 16, 2017 at 10:09:41 AM UTC-5, Thomas Heller wrote:
>
> C:\Users\Michael\Documents\src\hello_world>java -cp "cljs.jar;src" clojure
> .main node.clj
>
> Don't run java in the hello world directory. Run it in C:\Users\Michael\
> Documents
>

-- 
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 clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.


[ClojureScript] Re: Trying to get "how to use Clojurescript in node.js" to work

2017-06-16 Thread Thomas Heller
C:\Users\Michael\Documents\src\hello_world>java -cp "cljs.jar;src" clojure.main 
node.clj

Don't run java in the hello world directory. Run it in C:\Users\Michael\
Documents

-- 
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 clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.


[ClojureScript] Re: Trying to get "how to use Clojurescript in node.js" to work

2017-06-16 Thread Jose Figueroa Martinez
Hello,

try renaming your *src/hello-world/* to *src/hello_world/*

I think you renamed the project folder, not the source folder in *src/*.

Saludos!


El viernes, 16 de junio de 2017, 9:12:38 (UTC-5), Mike Frederick escribió:
>
> OK, I did that, re-ran the compile and execution commands, and got a 
> similar result:
>
> C:\Users\Michael\Documents\src\hello-world>cd ..
>
> C:\Users\Michael\Documents\src>cd hello_world
>
> C:\Users\Michael\Documents\src\hello_world>java -cp "cljs.jar;src" clojure
> .main node.clj
>
> C:\Users\Michael\Documents\src\hello_world>node main.js
> goog.require could not find: hello_world.core
>
> C:\Users\Michael\Documents\src\hello_world\out\goog\base.js:681
> throw Error(errorMessage);
>   ^
> Error: goog.require could not find: hello_world.core
> at Error (native)
> at Object.goog.require (C:\Users\Michael\Documents\src\hello_world\out
> \goog\base.js:681:11)
> at Object. (C:\Users\Michael\Documents\src\hello_world\main
> .js:22:6)
> at Module._compile (module.js:570:32)
> at Object.Module._extensions..js (module.js:579:10)
> at Module.load (module.js:487:32)
> at tryModuleLoad (module.js:446:12)
> at Function.Module._load (module.js:438:3)
> at Module.runMain (module.js:604:10)
> at run (bootstrap_node.js:394:7)
>
>
> On Friday, June 16, 2017 at 7:26:16 AM UTC-5, Chris Perkins wrote:
>>
>> Try renaming your "hello-world" directory to "hello_world".
>>
>> See: 
>> https://stackoverflow.com/questions/4420944/why-does-clojure-convert-dashes-in-names-to-underscores-in-the-filesystem
>>
>> On Thursday, June 15, 2017 at 5:34:22 PM UTC-6, Mike Frederick wrote:
>>>
>>> All,
>>>
>>> It seems like I have setup/built everything correctly, but I cannot get 
>>> the tutorial given at https://clojurescript.org/guides/quick-start to 
>>> work...
>>>
>>> here is the file *src\hello-world\core.cljs*
>>>
>>> (ns hello-world.core
>>>   (:require [cljs.nodejs :as nodejs]))
>>>
>>> (nodejs/enable-util-print!)
>>>
>>> (defn -main [& args]
>>>   (println "Hello world!"))
>>>
>>> (set! *main-cli-fn* -main)
>>>
>>> and here is the file *src\hello-world\node.clj*
>>>
>>> (require 'cljs.build.api)
>>> (cljs.build.api/build "src"
>>>  {:main 'hello-world.core
>>>  :output-to "main.js"
>>>  :target :nodejs})
>>>


>>> These look to be exactly as listed at the tutorial web site. Yes, I am 
>>> using a Windows system. I compile this with:
>>>
>>> C:\Users\Michael\Documents\src\hello-world>java -cp "cljs.jar;src" 
>>> clojure.main node.clj
>>>
>>> and get no messages. Then I type:
>>>
>>> C:\Users\Michael\Documents\src\hello-world>node main.js
>>> goog.require could not find: hello_world.core
>>>
>>> C:\Users\Michael\Documents\src\hello-world\out\goog\base.js:681
>>> throw Error(errorMessage);
>>>   ^
>>> Error: goog.require could not find: hello_world.core
>>> at Error (native)
>>> at Object.goog.require (C:\Users\Michael\Documents\src\hello-world\
>>> out\goog\base.js:681:11)
>>> at Object. (C:\Users\Michael\Documents\src\hello-world\
>>> main.js:22:6)
>>> at Module._compile (module.js:570:32)
>>> at Object.Module._extensions..js (module.js:579:10)
>>> at Module.load (module.js:487:32)
>>> at tryModuleLoad (module.js:446:12)
>>> at Function.Module._load (module.js:438:3)
>>> at Module.runMain (module.js:604:10)
>>> at run (bootstrap_node.js:394:7)
>>>
>>> Can anyone help me get this running? TIA
>>>
>>

-- 
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 clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.


[ClojureScript] Re: Trying to get "how to use Clojurescript in node.js" to work

2017-06-16 Thread Mike Frederick
OK, I did that, re-ran the compile and execution commands, and got a 
similar result:

C:\Users\Michael\Documents\src\hello-world>cd ..

C:\Users\Michael\Documents\src>cd hello_world

C:\Users\Michael\Documents\src\hello_world>java -cp "cljs.jar;src" clojure.main 
node.clj

C:\Users\Michael\Documents\src\hello_world>node main.js
goog.require could not find: hello_world.core

C:\Users\Michael\Documents\src\hello_world\out\goog\base.js:681
throw Error(errorMessage);
  ^
Error: goog.require could not find: hello_world.core
at Error (native)
at Object.goog.require (C:\Users\Michael\Documents\src\hello_world\out\
goog\base.js:681:11)
at Object. (C:\Users\Michael\Documents\src\hello_world\main.
js:22:6)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)


On Friday, June 16, 2017 at 7:26:16 AM UTC-5, Chris Perkins wrote:
>
> Try renaming your "hello-world" directory to "hello_world".
>
> See: 
> https://stackoverflow.com/questions/4420944/why-does-clojure-convert-dashes-in-names-to-underscores-in-the-filesystem
>
> On Thursday, June 15, 2017 at 5:34:22 PM UTC-6, Mike Frederick wrote:
>>
>> All,
>>
>> It seems like I have setup/built everything correctly, but I cannot get 
>> the tutorial given at https://clojurescript.org/guides/quick-start to 
>> work...
>>
>> here is the file *src\hello-world\core.cljs*
>>
>> (ns hello-world.core
>>   (:require [cljs.nodejs :as nodejs]))
>>
>> (nodejs/enable-util-print!)
>>
>> (defn -main [& args]
>>   (println "Hello world!"))
>>
>> (set! *main-cli-fn* -main)
>>
>> and here is the file *src\hello-world\node.clj*
>>
>> (require 'cljs.build.api)
>> (cljs.build.api/build "src"
>>  {:main 'hello-world.core
>>  :output-to "main.js"
>>  :target :nodejs})
>>
>>>
>>>
>> These look to be exactly as listed at the tutorial web site. Yes, I am 
>> using a Windows system. I compile this with:
>>
>> C:\Users\Michael\Documents\src\hello-world>java -cp "cljs.jar;src" 
>> clojure.main node.clj
>>
>> and get no messages. Then I type:
>>
>> C:\Users\Michael\Documents\src\hello-world>node main.js
>> goog.require could not find: hello_world.core
>>
>> C:\Users\Michael\Documents\src\hello-world\out\goog\base.js:681
>> throw Error(errorMessage);
>>   ^
>> Error: goog.require could not find: hello_world.core
>> at Error (native)
>> at Object.goog.require (C:\Users\Michael\Documents\src\hello-world\
>> out\goog\base.js:681:11)
>> at Object. (C:\Users\Michael\Documents\src\hello-world\
>> main.js:22:6)
>> at Module._compile (module.js:570:32)
>> at Object.Module._extensions..js (module.js:579:10)
>> at Module.load (module.js:487:32)
>> at tryModuleLoad (module.js:446:12)
>> at Function.Module._load (module.js:438:3)
>> at Module.runMain (module.js:604:10)
>> at run (bootstrap_node.js:394:7)
>>
>> Can anyone help me get this running? TIA
>>
>

-- 
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 clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.


[ClojureScript] Re: Trying to get "how to use Clojurescript in node.js" to work

2017-06-16 Thread Chris Perkins
Try renaming your "hello-world" directory to "hello_world".

See: 
https://stackoverflow.com/questions/4420944/why-does-clojure-convert-dashes-in-names-to-underscores-in-the-filesystem

On Thursday, June 15, 2017 at 5:34:22 PM UTC-6, Mike Frederick wrote:
>
> All,
>
> It seems like I have setup/built everything correctly, but I cannot get 
> the tutorial given at https://clojurescript.org/guides/quick-start to 
> work...
>
> here is the file *src\hello-world\core.cljs*
>
> (ns hello-world.core
>   (:require [cljs.nodejs :as nodejs]))
>
> (nodejs/enable-util-print!)
>
> (defn -main [& args]
>   (println "Hello world!"))
>
> (set! *main-cli-fn* -main)
>
> and here is the file *src\hello-world\node.clj*
>
> (require 'cljs.build.api)
> (cljs.build.api/build "src"
>  {:main 'hello-world.core
>  :output-to "main.js"
>  :target :nodejs})
>
>>
>>
> These look to be exactly as listed at the tutorial web site. Yes, I am 
> using a Windows system. I compile this with:
>
> C:\Users\Michael\Documents\src\hello-world>java -cp "cljs.jar;src" clojure
> .main node.clj
>
> and get no messages. Then I type:
>
> C:\Users\Michael\Documents\src\hello-world>node main.js
> goog.require could not find: hello_world.core
>
> C:\Users\Michael\Documents\src\hello-world\out\goog\base.js:681
> throw Error(errorMessage);
>   ^
> Error: goog.require could not find: hello_world.core
> at Error (native)
> at Object.goog.require (C:\Users\Michael\Documents\src\hello-world\out
> \goog\base.js:681:11)
> at Object. (C:\Users\Michael\Documents\src\hello-world\main
> .js:22:6)
> at Module._compile (module.js:570:32)
> at Object.Module._extensions..js (module.js:579:10)
> at Module.load (module.js:487:32)
> at tryModuleLoad (module.js:446:12)
> at Function.Module._load (module.js:438:3)
> at Module.runMain (module.js:604:10)
> at run (bootstrap_node.js:394:7)
>
> Can anyone help me get this running? TIA
>

-- 
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 clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.