This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-26
Channels
- # adventofcode (2)
- # announcements (7)
- # babashka (20)
- # beginners (77)
- # brompton (6)
- # calva (4)
- # clj-kondo (28)
- # clj-together (1)
- # cljdoc (2)
- # cljfx (10)
- # cljsrn (1)
- # clojure (77)
- # clojure-europe (33)
- # clojure-gamedev (12)
- # clojure-uk (11)
- # clojurescript (95)
- # clojureverse-ops (4)
- # core-async (4)
- # core-logic (1)
- # cryogen (2)
- # cursive (14)
- # data-science (3)
- # datomic (47)
- # duct (1)
- # emacs (7)
- # fulcro (51)
- # gratitude (8)
- # helix (14)
- # hoplon (4)
- # improve-getting-started (60)
- # jobs (1)
- # jobs-discuss (4)
- # joker (11)
- # lsp (99)
- # meander (62)
- # membrane (5)
- # news-and-articles (3)
- # off-topic (64)
- # pathom (3)
- # polylith (11)
- # practicalli (7)
- # react (1)
- # reagent (8)
- # reveal (15)
- # shadow-cljs (78)
- # specter (7)
- # sql (16)
- # tools-build (1)
- # tools-deps (29)
- # workspaces (1)
- # xtdb (17)
Hello. Thanks for a great library. We use helix for one of the primary apps at Guaranteed Rate!
I’m am a little confused about the version of react to use with Helix. Because we bring in a few other react-dependent npm dependencies, we have to also have react as a peer dependency.
Anyway, helix uses "react": "^17.0.1"
in the packages.json, but then requires
{:npm-deps {react "16.13.1"
react-refresh "0.8.1"}}
in src/deps.cljs
If I add "react": "^17.0.2"
to my own package.json, I get errors like
NPM dependency "react" has installed version "^17.0.2"
"16.13.1" was required by jar:file:/Users/user/.m2/repository/lilactown/helix/0.1.1/helix-0.1.1.jar!/deps.cljs
NPM dependency "react-refresh" has installed version "^0.10.0"
"0.8.1" was required by jar:file:/Users/user/.m2/repository/lilactown/helix/0.1.1/helix-0.1.1.jar!/deps.cljs
Is this a possible bug/oversight, or a complete misunderstanding of things on my part?the deps.cljs
was my way of trying to make things easy but in practice I think it's a mistake
those errors are not errors, just warnings by shadow-cljs. they do not block anything
That makes sense. Is it intentional to have different versions in those 2 files?
the package.json in the repo for helix is for tests and local development of the library. it has no bearing on your application
the deps.cljs
i added at some point because i had this idea that someone should be able to install helix without messing with their own package.json, if they don't want to control the version of React they use
so shadow-cljs and other tools will look at deps.cljs
and automatically install whatever is in there for you
you can override it by providing your own versions in your app's package.json, which you've done. this generates a warning, but helix supports anything > React 16.8 so it's fine
Thanks for all the context. I appreciate it. And thanks again for a great library!