Fork me on GitHub
#shadow-cljs
<
2020-05-29
>
tekacs03:05:36

has anyone been able to use shadow and REBL together, at all?

tekacs03:05:07

I'd love to use REBL against shadow's nREPL, which I'm accessing from Cursive

thheller07:05:28

no clue how to hook up REBL to nrepl

8
👍 4
metehan14:05:06

when I release an app on server it has some bug Is there anyway to debug it.

cjsauer16:05:43

While using the :node-script target, is it possible to have shadow inline all require(...) calls in order to produce a single, standalone output file? I have the following in my cljs file:

(:require ["@cucumber/gherkin" :as gherkin]
          ["@cucumber/messages" :refer [IdGenerator]]
          )
Which is leading to ...; var x=require("@cucumber/messages"); ... calls in the compiled output. Wondering if there is any way to “inline” those. I’ve tried setting {:js-provider :shadow} but then I run into:
The required JS dependency "stream" is not available, it was required by "node_modules/@cucumber/gherkin/dist/src/stream/GherkinStreams.js".
So I’m not sure that this provider is compatible with node…

cjsauer19:05:16

Ah that looks great. Thanks.

Lukas19:05:33

Hi guys, I have a very basic beginner question: I try to get shadow-cljs working with deps.edn. In my deps.edn I defined the deps for shadow-cljs

:aliases
 {:cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.764"}
                     thheller/shadow-cljs {:mvn/version "2.9.10"}
                     reagent {:mvn/version "1.0.0-alpha2"}}}
when I now start shadow-cljs I get an error Use of undeclared Var reagent.core/render-component . How can I import reagent into my project? ( and yes i have absolutly no idea what I"m doing :D )

Lukas20:05:52

The full error message

Use of undeclared Var reagent.core/render-component

   2 |   (:require [reagent.core :as reagent]))

   3 | 

   4 | (defn load-app []

   5 |   (reagent/render-component

   6 |    [:h1 "hallo"]

   7 |    (. js/document (getElementById "app"))))

   8 | 

   9 | (defn ^:export init

thheller20:05:44

its just render not render-component

Lukas20:05:29

this didn't work out, shadow tells me explicit that reagent is missing here. Any other idea?:face_with_rolling_eyes:

thheller20:05:42

whats the error?

Lukas20:05:00

(reagent/render

-^---------------------------------------------------------------------

Use of undeclared Var reagent.core/render

Lukas20:05:28

I guess reagent is just missing

thheller20:05:55

no. shadow-cljs isn't telling you that reagent is missing

thheller20:05:13

it is telling you that var is missing. thats entirely difrerent error. reagent.core exists just fine

thheller20:05:35

maybe render was moved? I have no clue. you are using an alpha2 version so make sure that actually has what you need

Lukas20:05:08

okay that's good input

thheller20:05:36

quick guess is that render was moved to reagent.dom/render instead

thheller20:05:53

so no longer in reagent.core

Lukas20:05:00

ty for ur time really appreciate is

Lukas20:05:33

kinda hard, as a beginner, to figure out what exactly is the problem 😏

thheller20:05:44

yeah it might be better to sticking with stable stuff .. alpha things should probably be avoided as a beginner 😛

Lukas20:05:51

ty :rolling_on_the_floor_laughing: told ya i don't know what im doing. Thanks a lot