This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-20
Channels
- # announcements (42)
- # babashka (70)
- # beginners (152)
- # chlorine-clover (19)
- # cider (14)
- # clj-kondo (23)
- # clojars (15)
- # clojure (86)
- # clojure-denmark (1)
- # clojure-dev (5)
- # clojure-europe (57)
- # clojure-france (145)
- # clojure-hungary (2)
- # clojure-italy (5)
- # clojure-nl (7)
- # clojure-spec (35)
- # clojure-sweden (2)
- # clojure-uk (58)
- # clojurebridge (1)
- # clojured (1)
- # clojurescript (50)
- # core-typed (9)
- # cursive (10)
- # data-science (11)
- # datascript (4)
- # datomic (25)
- # emacs (8)
- # fulcro (49)
- # graalvm (7)
- # graphql (6)
- # joker (1)
- # juxt (2)
- # kaocha (1)
- # off-topic (22)
- # other-lisps (1)
- # pathom (20)
- # re-frame (3)
- # reagent (11)
- # reitit (2)
- # remote-jobs (1)
- # shadow-cljs (44)
- # spacemacs (2)
- # sql (17)
- # tree-sitter (2)
- # vim (8)
- # vrac (2)
Hello 🙂
Does anyone try to use @material-ui/icons
?
I have a weird error when I import:
["@material-ui/icons/Menu" :default menu-icon] => Module not provided: module$node_modules$$material_ui$icons$Menu
The module exists on path node_modules/@material-ui/icons/Menu.js
This looks OK. Is this the only icon that fails? I'd check your version of @material-ui/icons
- you have to import it separately
regarding my issue from a few days ago where i was getting compilation errors without a stack trace, it seems to have been because i was trying to inline in my CLJS file a weird Java object via a clojure macro. 🤷
I've used shadow-cljs before successfully. However a new project template with a reagent and a lein based project.clj deps, is throwing the following error on shadow-cljs watch: How do I debug this?
$ shadow-cljs watch app
shadow-cljs - config: /home/.../shadow-cljs.edn cli version: 2.8.83 node: v12.3.1
shadow-cljs - socket connect failed, server process dead?
shadow-cljs - running: lein run -m shadow.cljs.devtools.cli --npm watch appshadow-cljs - running: lein run -m shadow.cljs.devtools.cli --npm watch app
Exception in thread "main" Syntax error compiling . at (shadow/build/closure.clj:69:5).
at clojure.lang.Compiler.analyzeSeq(Compiler.java:7115)
at clojure.lang.Compiler.analyze(Compiler.java:6789)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:7095)
at clojure.lang.Compiler.analyze(Compiler.java:6789)
at clojure.lang.Compiler.analyze(Compiler.java:6745)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3888)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:7109)
...
...
Caused by: java.lang.NoSuchFieldException: getRegisteredGroups
at java.base/java.lang.Class.getField(Class.java:1999)
at clojure.lang.Compiler$StaticFieldExpr.<init>(Compiler.java:1284)
at clojure.lang.Compiler$HostExpr$Parser.parse(Compiler.java:1006)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:7107)
... 188 more
the versions in the solution might be out of date, but the general advice is still good: make sure that you’re specifying the same clojurescript, closure-compiler-unshaded and google-closure-library versions as shadow-cljs
thanks @lilactown @thheller. How do you expect future users of shadow, using future versions of cljs and lein would not run into this issue?
I always recommend people use shadow-cljs.edn
for dependencies .. then you don't have to worry about such things
but you really don't have to do much to sort it out in lein ... just figure out where you conflicts are coming from and fix them
the following seems to be a better, fool proof way, to avoid future conflicts.
[org.clojure/clojurescript "1.10.597"
:exclusions [com.google.javascript/closure-compiler-unshaded
org.clojure/google-closure-library
org.clojure/google-closure-library-third-party]]
Hey does anybody have any experience with deploying shadow-cljs apps to heroku? Do I need to deploy it as a node app or is there another way? I see heroku only allows for lein apps when it comes to clojure.
If that's still relevant to you, I have a Clojure[Script] app on Heroku. But it's not as dev-friendly as it could've been right now because it wants you to use Lein - I had to strip down their build pack to a bare minimum and to write my own bash code to build CLJS with shadow-cljs.
just a webapp that I made with shadow-cljs
so in a browser I guess
my experience with deploying webapps is minimal to say the least
no serverside no
just a simple MVP proof of concept frontent reagent/re-frame app
frontend
I don't know anything about heroku but there likely is some option to deploy some static files?
yes but it seems to want me to deploy it as a php app and mess around with the filenames, creating an index.php and renaming my index.html
lein provides a lot more functionality (plugins, cider integration, templates) than shadow/deps.edn/lumo, and likely not going away. I've used it for 6+ years and has a lot more stability. It would be better to document dependency issues while integrating with other tools, than to wait till someone has to stackoverflow them.
netlify, I’ll check it out @dpsutton
Hmm this feels a little bit too easy if you ask me 😉
@pri so you’re saying I should just use lein?
No. We should be aware of dependency conflicts while using multiple tools together. I only have this issue with lumo/shadow as they bundle their own versions.
@pri it isn't easy to document those kind of issues. a) they likely change between versions b) they depend on whatever else you are using