Followed the javascript-modules 
<https://clojurescript.org/guides/javascript-modules> guide on the official 
site,  and use the latest clojurescript version 1.10.238.
And the compiled this:
(defn -main [& args]
  (hello/sayHello))


then run `node main.js`, there comes the error message: 
'module$path$to$src$js$hello.sayHello is not a function'.
I checked the compiled js file, and here is the content:
goog.provide("module$path$to$src$js$hello");
var sayHello$$module$path$to$src$js$hello=function(){console.log("hello, 
world!")};console.log("i am changed in hello.");
sayHello$$module$path$to$src$js$hello();

*var module$path$to$src$js$hello={};*
module$path$to$src$js$hello.sayHello=sayHello$$module$path$to$src$js$hello;



And if I remove the  module variable declare line, or add a line 
'*goog.exportSymbol("module$path$to$src$js$hello", 
module$path$to$src$js$hello);*',
then *`node main.js`* will run without error.

Is this an issue of clojurescript, or closure compiler?



-- 
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.

Reply via email to