Fork me on GitHub
#shadow-cljs
<
2018-10-02
>
sb18:10:15

If I get a similar message and yarn add react not helps, then what can I do?

The required namespace "react" is not available, it was required by "reagent/core.cljs".
I read the documentation, but not clear for me. How possible to solve? I added to project.clj exclusions too /cljsjs/react.

sb18:10:46

Somebody saw similar issue? This is not my project, just an example, just I would like to understand.. maybe I will see in my projects too.

thheller18:10:30

@sb in shadow-cljs you use npm packages directly. so you need to npm install react

thheller18:10:50

unfortunately reagent doesn't properly declare its dependency on react since it uses cljsjs

thheller18:10:02

you probably need npm install react react-dom create-react-class

thheller18:10:25

if you have an example it probably has those dependencies already set and you just did not run npm install

sb18:10:54

Same example. Now, I have more time to play with that.

thheller18:10:32

they are declared so you just need to run npm install in the project directory

sb18:10:02

Yes, I did it. I test again. Clear npm modules and restart.

sb18:10:30

Ok, I don’t know what was the problem. Now works. Sorry!

sb18:10:36

Thanks 👍

markx20:10:07

Hi just curious: is it possible to get rid of <script>simple.core.init();</script> from html?

markx20:10:43

oh so it’s just for the first load, and not mandatory. nvm

clojuregeek23:10:12

I’m trying to debug some tests.. is there anyway to do a println ? Tried that and js/console.log

richiardiandrea23:10:11

@clojuregeek are you on node? because the stdout logs at the moment may appear in terminal that you are not expecting (not that test terminal window)