This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-17
Channels
- # announcements (13)
- # beginners (56)
- # brompton (1)
- # cider (2)
- # cljsrn (10)
- # clojure (369)
- # clojure-australia (4)
- # clojure-boston (1)
- # clojure-europe (28)
- # clojure-nl (1)
- # clojure-spec (1)
- # clojure-uk (18)
- # clojurescript (26)
- # data-science (2)
- # datahike (4)
- # datalog (2)
- # datasplash (6)
- # datomic (9)
- # events (1)
- # kaocha (4)
- # macro (1)
- # malli (22)
- # meander (40)
- # membrane (30)
- # music (1)
- # nbb (3)
- # news-and-articles (3)
- # off-topic (12)
- # practicalli (1)
- # re-frame (19)
- # remote-jobs (1)
- # sci (22)
- # shadow-cljs (15)
- # spacemacs (4)
- # tools-deps (40)
- # xtdb (26)
hey y'all, i'm running into a strange issue. I'm using reagent and re-frame, and I have a component from namespace.a
that includes a component from namespace.b
. However, namespace.b/component
is returning nil
, which is very strange. namespace.b
is requiring D3 with (:require ["d3" :as d3])
. D3 has been added to my package.json
if I take out the d3 require, then everything loads fine
Also, this is only when the app initially loads. If I make a change and shadow reloads the page, then the namespace.b/component
no longer evals to nil, and everything works ok
OK it looks like upgrading from shadow-cljs 2.8.something to 2.15.3 solved the problem 🎉
@nonrecursive always check the browser console. if the namespace fails to load for some reason it won't be available properly. browser console should tell you something at least
Hello, I have an issue with importing of a npm module in a cljc file in shadow-cljs:
------ ERROR -------------------------------------------------------------------
File: /home/void/wp/crispeta/src/acme/web/ui/components.cljs
failed to require macro-ns "acme.web.utils.macros", it was required by "acme.web.ui.components"
Syntax error macroexpanding clojure.core/ns.
Call to clojure.core/ns did not conform to spec.
-- Syntax error -------------------
(... (:require
[camel-snake-kebab.core :as csk]
["semantic-ui-react" :as semantic-ui]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
has extra input
-- Relevant specs -------
:clojure.core.specs.alpha/ns-form:
(clojure.spec.alpha/cat
:ns-name
clojure.core/simple-symbol?
:docstring
(clojure.spec.alpha/? clojure.core/string?)
:attr-map
(clojure.spec.alpha/? clojure.core/map?)
:ns-clauses
:clojure.core.specs.alpha/ns-clauses)
-------------------------
Detected 1 error
Oh I see.
So no macros using npm modules?
oh I see
I think that'll work, yes