This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-25
Channels
- # announcements (1)
- # beginners (131)
- # cljs-dev (1)
- # clojure (178)
- # clojure-argentina (1)
- # clojure-dev (3)
- # clojure-uk (2)
- # clojuredesign-podcast (1)
- # clojurescript (16)
- # code-reviews (2)
- # core-async (2)
- # emacs (28)
- # figwheel-main (19)
- # fulcro (11)
- # kaocha (1)
- # leiningen (4)
- # music (6)
- # off-topic (2)
- # re-frame (2)
- # reitit (6)
- # rewrite-clj (9)
- # shadow-cljs (78)
- # slack-help (6)
I’m trying to move @thheller fulcro expo example from F2 to F3 (current one) after but I’m getting
Module app registry is not registered call-back module
, the code in question is: (defonce app (app/fulcro-app
{:render-root! expo/render-root}))
(defn init
{:dev/after-load true}
[]
(app/mount! app Root :i-got-no-dom-node)
(js/console.log "Loaded"))
`
Where app
comes from [com.fulcrologic.fulcro.application :as app]
Any ideas?I'm just trying shadow-cljs for the first time, I'm getting an error when I include reagent in the shadow-cljs dependencies
The required namespace "react" is not available, it was required by "reagent/core.cljs".
The namespace was provided via :foreign-libs which is not supported.
Please refer to for more information.
You may just need to run:
npm install react
yeah that likely won't have a package.json
so you should create that via npm init -y
i am struggling to see how :npm-deps
works
i put it in both my deps.edn
and a deps.cljs
file in src
somewhere
it just complains with "you probably need to run: npm install auth0-js
"
wait... i got it
https://www.reddit.com/r/Clojure/comments/72wf86/shadowcljs_js_dependencies_going_forward/dnm06x6/
"at the root of the classpath"
those words missing from the docs
it is assumed that you use npm install react
or so to manage JS deps (which will add it to package.json
)
i just put deps.cljs
at the top of my classpath and shadow cljs did an npm save
which... yes... put it in package.json
so what's that all about?
npm uses package.json
so we need to put it there. I only recommend using deps.cljs
when publishing libraries. Otherwise use package.json
directly AND keep your package-lock.json
in version control too.
publishing where?
what is a library in your mind?
this is a library published to clojars and used downstream by an SPA
and i have a demo site in the repo that is an SPA on github pages
so both i think
should i also have a deps.cljs
?
are you talking about the downstream SPA or the github pages demo SPA in the library repo?
what does the deps.cljs
do?
if you publish a library the deps.cljs
should be provided as a convenience so downstream users have that dependency automatically installed
well i do need to do that
because this is a library i am publishing
and there is a dependency on an npm package
auth0-js
yes that is fine. you can have both but package.json
is the source of truth and will be used over deps.cljs
ok good to know thanks
deps.cljs
npm-deps are only only transfered if they are not contained in package.json
already
right, that makes sense
next question
i did ["auth0-js" :as auth0-js]
in my :require
Use of undeclared Var hoplon-auth0.api/auth0-js
------ WARNING #1 - :undeclared-var --------------------------------------------
File: /home/thedavidmeister/hoplon-auth0/src/hoplon_auth0/api.cljs:28:2
--------------------------------------------------------------------------------
25 |
26 | (defn web-auth
27 | []
28 | (auth0-js.WebAuth.
--------^-----------------------------------------------------------------------
Use of undeclared Var hoplon-auth0.api/auth0-js
--------------------------------------------------------------------------------
29 | hoplon-auth0.data/web-auth))
30 |
31 | (defn authorize
32 | ([] (authorize nil))
--------------------------------------------------------------------------------
i knew it would be something dumb like that
thanks
Can’t seem to find anything in the user guide and the deps.edn
syntax doesn’t seem to be working
(I’m trying to experiment with https://github.com/roman01la/uix specifically)
@warnsberg perhaps not exactly what you are asking for, but if you don't mind using :deps true in shadow-cljs.edn + supply a deps.edn, may be that's one way?