This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-09
Channels
- # announcements (10)
- # aws (7)
- # babashka (28)
- # babashka-sci-dev (53)
- # beginners (11)
- # clojure (43)
- # clojure-europe (100)
- # clojure-morsels (1)
- # clojure-nl (2)
- # clojure-norway (6)
- # clojure-russia (2)
- # clojure-spec (13)
- # clojure-uk (7)
- # clojurescript (13)
- # conjure (21)
- # datalevin (3)
- # emacs (46)
- # etaoin (4)
- # events (2)
- # fulcro (36)
- # graphql (7)
- # gratitude (1)
- # interceptors (13)
- # jobs-discuss (3)
- # kaocha (13)
- # membrane (3)
- # minecraft (2)
- # nbb (8)
- # off-topic (135)
- # pathom (30)
- # podcasts-discuss (1)
- # re-frame (24)
- # releases (1)
- # shadow-cljs (26)
- # sql (16)
- # squint (6)
- # tools-deps (4)
- # xtdb (8)
Ok. I expected every npm package to be usable with shadow-cljs. Thank you for your help!
some just use npm as a delivery mechanism without any expectation of actually being bundle-able
you could add the line module.exports = LeaderLine;
as the last line in its sources to make it an actual npm package with an export
I’ve upgraded shadow-cljs from 2.19.0 to 2.20.1 (among other things) and now the compilation fails with the following exception:
[:app] Configuring build.
[:app] Compiling ...
[:app] Build failure:
IllegalArgumentException: No matching method setOutputFeatureSet found taking 1 args for class com.google.javascript.jscomp.CompilerOptions
clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:127)
clojure.lang.Reflector.invokeInstanceMethod (Reflector.java:102)
shadow.build.closure/set-options (closure.clj:166)
shadow.build.closure/set-options (closure.clj:122)
shadow.build.closure/convert-goog* (closure.clj:2290)
shadow.build.closure/convert-goog* (closure.clj:2255)
shadow.build.closure/convert-goog (closure.clj:2434)
shadow.build.closure/convert-goog (closure.clj:2384)
shadow.build.compiler/maybe-closure-convert (compiler.clj:1233)
shadow.build.compiler/maybe-closure-convert (compiler.clj:1226)
shadow.build.compiler/compile-all (compiler.clj:1468)
shadow.build.compiler/compile-all (compiler.clj:1345)
shadow.build.api/compile-sources (api.clj:261)
shadow.build.api/compile-sources (api.clj:253)
shadow.build/compile (build.clj:512)
shadow.build/compile (build.clj:493)
shadow.cljs.devtools.server.worker.impl/build-compile (impl.clj:368)
shadow.cljs.devtools.server.worker.impl/build-compile (impl.clj:349)
shadow.cljs.devtools.server.worker.impl/eval28465/fn--28467 (impl.clj:448)
clojure.lang.MultiFn.invoke (MultiFn.java:234)
shadow.cljs.devtools.server.util/server-thread/fn--28223/fn--28224/fn--28232 (util.clj:283)
shadow.cljs.devtools.server.util/server-thread/fn--28223/fn--28224 (util.clj:282)
shadow.cljs.devtools.server.util/server-thread/fn--28223 (util.clj:255)
java.lang.Thread.run (Thread.java:833)
Has anyone seen this before? I could not find anything neither in the web nor here….I’ve figured it out, the following dependency caused the exception:
[com.google.javascript/closure-compiler-unshaded "v20220905"]
Reverting to
[com.google.javascript/closure-compiler-unshaded "v20220502"]
solved the issue.
actually it should be [com.google.javascript/closure-compiler-unshaded "v20220803"]
for 2.20.1
unfortunately the closure compiler frequently introduces breaking changes to their API
Hi Thomas! I got further with my externs hunt, fixed many issues. One that still bugs me is that Closure seems to rename usage of properties of some browser APIs, notably the SVG elements properties. Do you have an idea of how to provide all externs for SVGElement? Other than just copying its API from MDN. ––––––––––––––– Update: yea, seems like Closure actually may not support SVG out of the box! https://github.com/google/closure-compiler/wiki/Externs-For-Common-Libraries#svg
these are the default svg externs that are included https://github.com/google/closure-compiler/blob/master/externs/browser/svg.js
Hi, I'm trying to export some components from an application that uses React + NextJS + Tailwind to import in a clojurescript app with helix an shadow-cljs, so does anyone knows how can I do this? I was trying to install my app on package json but had some problems I will send on the 🧵
when I installed my components into my cljs app here is the components into node modules
this is an exemple https://github.com/moclojer/try-import-components-lib-into-cljs-app
this is the components that I want import https://github.com/moclojer/try-import-components-lib-into-cljs-app/blob/main/lib/index.jsx
this is how I tried to use https://github.com/moclojer/try-import-components-lib-into-cljs-app/blob/main/src/cljs/app/core.cljs#L6
Not sure if this is the only issue but you might have a misspelling in your cljs import. Should it say "moclojer-components" (you're missing the "r")
the components use next.js? normally next.js is the app and is not used to create libraries?
Oh it uses but I can remove if next is the problem. But not sure what I did is right. The component are jsx should I have to transpile to js?
hi @U05224H0W, @UMMMKKADU open a PR https://github.com/moclojer/try-import-components-lib-into-cljs-app/pull/1 to help me, this was what I try to do. I’m sending here to share if someone wants do the same thing.. Thanks