This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-05
Channels
- # babashka (14)
- # beginners (62)
- # calva (1)
- # cider (54)
- # clj-kondo (3)
- # cljdoc (15)
- # cljs-dev (2)
- # clojure (180)
- # clojure-europe (5)
- # clojure-italy (4)
- # clojure-losangeles (1)
- # clojure-nl (2)
- # clojure-spec (10)
- # clojure-uk (39)
- # clojurescript (85)
- # core-async (9)
- # core-logic (1)
- # core-typed (5)
- # data-science (27)
- # datomic (2)
- # emacs (15)
- # figwheel-main (98)
- # fulcro (26)
- # graphql (15)
- # helix (1)
- # jobs-discuss (26)
- # kaocha (1)
- # off-topic (54)
- # other-lisps (1)
- # re-frame (21)
- # reagent (1)
- # reitit (3)
- # shadow-cljs (49)
- # spacemacs (12)
- # specter (5)
- # xtdb (2)
Hey everyone! Was wondering if anyone had a writeup/documentation about porting a lein cljs project with project.clj over to shadow-cljs?
no write-up but have done it a couple of times if you have any questions
Thanks! Just curious, what was your first step? which direction did you decide to go? Keep lein? remove? etcc.
i did this on https://github.com/infinitelives/px3d as one example. started by simply creating a shadow-cljs.edn
and package.json
as if i was starting from scratch.
i had done a few shadow-cljs projects by this time so that part was fairly straightforward
once it was all up and running i could remove the project.clj
though that isn't really neccessary
i also wrap everything in a Makefile
generally so i just modified the one i already had working
great, thank you so much!
hey no problem at all hope it goes well!
Did anything happen to the shadow-cljs nrepl? I got some nullpointer exception whenever I am trying to make autocompletion with Cider
It works with 2.9.10 but not 2.10.1
stay with 2.9.10 if you want cider auto complete for now. not sure I can or want to restore the not-public API it used before.
Thanks. So clj-suitable can actually change their API and it would work?
that is what I'm trying to determine in the ticket. not actually sure what they need. I think the new API fn should cover everything.
I'll see if I can restore the old stuff in some way but not sure I can. probably best to stay with 2.9.10 if you care about cider autocomplete
Thanks 🙂
Hi I am trying to use this React component: https://github.com/christo-pr/dangerously-set-html-content , I am using Reagent. At the top I have:
(ns app.core
(:require ["dangerously-set-html-content" :default InnerHTML]))
My component is:
(defn component []
(let [html-str "blabla"]
[:> InnerHTML {:html html-str}]))
I get this error in my JS console:
React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Thank you in advance for your time!I'm not sure what happens exactly but are there not a set of parantheses missing in the ns
declaration?
(ns app.core
:require ["dangerously-set-html-content" :default InnerHTML])
Should be:
(ns app.core
(:require ["dangerously-set-html-content" :default InnerHTML]))
Not sure if it would work without the parantheses@luca.cambiaghi try
(ns app.core
(:require ["dangerously-set-html-content" :as InnerHTML]))
@thheller awesome, that works! I feel stupid for not having tried it before! Thank you!!
Every time I start shadow-cljs up, it sends a build error on this particular line:
50 | #::table
----------------------^---------------------------------------------------------
No namespace: compute.ui.components.table found
The compute.ui.components.table
is required in the namespace this error is in. Is there a known issue with namespace map syntax?If I go make a small change to the table ns, the error goes away. It will then find another place where the namespace map syntax is used and fail on that. For example
139 | #::calendar{:value selected-date
-------------------------^------------------------------------------------------
No namespace: compute.ui.components.calendar found
Oh, perhaps. Will check. Latest shadow-cljs will print this warning to the console on reload: couldn't find custom :build-notify
Hello all, I´ll deploy my first shadow-cljs project. I know that I´ll have to compile it with npx shadow-cljs realease app
. But how do I pack the node_modules?
assuming you are talking about a :browser
build you only need the files in the :output-dir
yes, :browser
. If I did something like <link rel="stylesheet" href="node_modules/suneditor/dist/css/suneditor.min.css">
, copy it to the css asset?