This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-01
Channels
- # announcements (2)
- # babashka (26)
- # beginners (26)
- # biff (18)
- # boulder-clojurians (2)
- # cider (16)
- # clj-kondo (34)
- # cljs-dev (4)
- # clojure (22)
- # clojure-denver (10)
- # clojure-europe (16)
- # clojure-nl (1)
- # clojure-norway (10)
- # clojure-uk (2)
- # clojurescript (25)
- # conjure (3)
- # cursive (11)
- # datomic (11)
- # dev-tooling (6)
- # emacs (6)
- # etaoin (7)
- # events (1)
- # fulcro (6)
- # humbleui (11)
- # hyperfiddle (15)
- # instaparse (2)
- # introduce-yourself (2)
- # jobs-discuss (1)
- # lsp (26)
- # malli (7)
- # reitit (5)
- # releases (1)
- # sci (6)
- # shadow-cljs (16)
- # specter (5)
- # vim (5)
Hi Team, I have a question, Where does the fulcro app looks for the dependent react library source code? because for some commonjs modules (which has index.js file in lib folder) it could not able to find the source and getting `Use of undeclared Var fulcro-atlaskit.testkit/Box.` Thanks in Advance
As far as I'm aware, Fulcro is a library/framework so it doesn't occupy itself with dependencies. What does though, is your dependency management tool. Maybe tools.deps
(via deps.edn
), maybe Lein (via project.clj
) or maybe shadow-cljs (via shadow-cljs.edn
), or maybe something else.
fulcro-atlaskit
is a library separate from Fulcro. And its source code doesn't have the testkit
namespace, so it seems that whatever place you're getting that fulcro-atlaskit.testkit
line of code from, it uses a potentially outdated version of that library.
You are right, we are using shadow-cljs (added fulcro-atlaskit
library dependency in deps.edn
). We have added the name space fulcro-atlaskit.testkit in fulcro-atlaskit
library recently and we see that the dependencies are installed, compiled in our project. But not sure why it's unable to find the component in that namespace while consuming. Any idea?
fulcro-atlaskit
is on separate repository. And added that dependency in our current project deps.edn
xxxxxcorp/fulcro-atlaskit {:git/url "[email protected]:xxxxxcorp/fulcro-atlaskit"
:sha "d6e5e097062374fcad6ec8f5128abe01fafb1258"}
This commit (d6e5e097062374fcad6ec8f5128abe01fafb1258) has the latest changes
If that source code is private, I don't really know how to help.
I assumed it was public because I found an existing repo that's also named fucro-atlaskit
.
It is a public repo, mohamicorp/fulcro-atlaskit
. Please review
So that SHA points to the feature/NH-193
branch.
When you navigate to https://github.com/mohamicorp/fulcro-atlaskit/tree/feature/NH-193/src/fulcro_atlaskit you'll see that there's no testkit.cljs
or testkit.cljc
file in there. So where is that fulcro-atlaskit.testkit
namespace supposed to come from?
I masked the actual namespace name, it is fulcro-atlaskit.fuegokit
Problem is with consuming fuegokit
Sorry for that, I masked it due to privacy
I have a suggestion - create a minimal reproducible example in a separate repo, share it, and I'll take a look.
The code in that ns has a comment ;;(def ui-box (react-interop/react-factory Box))
.
Is that the Box
you were talking about?
If so, then where do you expect for it to come from? There's no :require
for it and no alias usage.
I have created another public repo to isolate the issue at https://github.com/mohamicorp/fulcro-app and added readme to reproduce the issue.
Box
can be named import from "@fuegokit/react" such as
["@fuegokit/react" :refer [Box]]
Might be related to https://clojurians.slack.com/archives/C6N245JGG/p1669756069405939 (see the original message in the main channel before the "hmm?"). but not sure.
I also can't build fulcro-app
that you shared because it relies on artifacts from a private NPM repository.
It also uses an outdated format for package-lock.json
(when was the last time your updated npm
?) which game me a crapton of warnings and HTTP 404 errors.
Apologies for that, there are few private npm repositories. Will check the possibility to share. My npm version is 6.14.17. Could be the issue with npm version?
Your npm
is old, but it has nothing to do with the Box
issue.
And please don't share with me private stuff. What you should do instead is create a truly minimal reproducible example, ideally one that doesn't even need NPM. That way, you'll also be able to try different build tools and check whether the problem is with CLJS itself or with shadow-cljs. If it's the former, a new thread in #C03S1L9DN is warranted. If the latter - it would definitely be more suited for #C6N245JGG.
Sure, I will try that. Thanks @U2FRKM4TW for your time. Appreciate your help.