Fork me on GitHub
#shadow-cljs
<
2022-01-20
>
lilactown04:01:10

the issue is ^js inside of go

thheller08:01:19

yeah, in general keep as much code as possible out of go. ^js hints are lost in most places and generates a lot more code than it would outside go

hadils12:01:24

Thanks, gentlemen. Most of the code inside go can’t be moved outside thought.

hadils12:01:06

Thanks again @lilactown @thheller. Getting rid of the ^js did the trick.

sb17:01:38

Hello, I require [“fs” :as fs] the Node FS module and I would like to use as (fs/readFileSync file-with-location) but I get: shadow$empty.readFileSync is not a function what is this error message?

dpsutton18:01:05

quick sanity check, are you running a browser or node repl?

sb18:01:49

I use IntelliJ with cljs repl via

(shadow.cljs.devtools.api/repl :app)

dpsutton18:01:36

and what is the :target for :app in your shadow-cljs.edn?

sb18:01:11

Yes, other libs loaded .. like jsonwebtoken npm lib

sb18:01:45

Sorry true, target browser

dpsutton18:01:33

then you cannot use the fs node module. It is only available in node and you are running in a browser

sb18:01:23

Ok, thanks the info! I don’t know that

sb18:01:30

I read now the documentation