This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-20
Channels
- # announcements (1)
- # babashka (32)
- # beginners (100)
- # cider (43)
- # clj-kondo (4)
- # cljdoc (3)
- # cljs-dev (5)
- # cljsjs (2)
- # cljsrn (22)
- # clojure (170)
- # clojure-australia (27)
- # clojure-europe (25)
- # clojure-nl (3)
- # clojure-uk (76)
- # clojurescript (127)
- # conjure (14)
- # core-matrix (1)
- # cursive (9)
- # datomic (6)
- # defnpodcast (1)
- # emacs (32)
- # events (1)
- # expound (77)
- # fulcro (30)
- # graalvm (21)
- # graalvm-mobile (30)
- # helix (4)
- # honeysql (1)
- # hyperfiddle (1)
- # jackdaw (8)
- # jobs (6)
- # kaocha (1)
- # leiningen (4)
- # lsp (16)
- # malli (46)
- # meander (4)
- # off-topic (19)
- # pathom (10)
- # podcasts-discuss (1)
- # portal (2)
- # re-frame (7)
- # reagent (2)
- # releases (1)
- # remote-jobs (11)
- # rewrite-clj (8)
- # shadow-cljs (9)
- # tools-deps (243)
- # vim (1)
Hello (not sure if this is the proper place to post this so apologies if that's not the case). I added a NPM package and I'm getting the following Closure Compiler error:
Closure compilation failed with 1 errors
--- node_modules/jspdf/dist/jspdf.es.min.js:10636
Duplicate let / const / class / function declaration in the same scope is not allowed.
I assume this is an issue with the library code itself (as the error states). I'm just wondering if there's a "quick and dirty" fix to solve this, or if my only option is to fork and fix the dependency?
The dependency: https://github.com/MrRio/jsPDFno easy fix unfortunately. well besides using another "dist" they ship. maybe the commonjs version doesn't have that issue? assuming of course that they ship multiple versions
👍 3
I'm getting this error after connecting my editor to my REPL:
e iced repl :main --force-shadow-cljs --with-cljs -A:dev
OK: CLJS option is enabled.
OK: shadow-cljs project is detected
OK: For shadow-cljs project, start watching instead of starting REPL.
shadow-cljs - config: /project/shadow-cljs.edn cli version: 2.8.64 node: v12.18.0
shadow-cljs - starting via "clojure"
shadow-cljs - HTTP server available at
shadow-cljs - server version: 2.11.23 running at
shadow-cljs - nREPL server started on port 9000
shadow-cljs - watching build :main
[:main] Configuring build.
[:main] Compiling ...
GUARDRAILS IS ENABLED. RUNTIME PERFORMANCE WILL BE AFFECTED.
Mode: :runtime Async? false Throw? false
Guardrails was enabled because the CLJS Compiler config enabled it
[:main] Build completed. (287 files, 0 compiled, 0 warnings, 9.00s)
[2021-07-20 11:27:28.995 - WARNING] :shadow.cljs.devtools.server.nrepl-impl/init-ns-ex - {:init-ns sheluchin.user}
Note: The following stack trace applies to the reader or compiler, your code was not executed.
CompilerException Unexpected error macroexpanding defrecord at (rewrite_clj/node/comment.clj:6:1). #:clojure.error{:phase :macroexpansion, :line 6, :column 1, :source "rewrite_clj/node/comment.clj", :symbol defrecord}
clojure.lang.Compiler.macroexpand1 (Compiler.java:7019)
clojure.lang.Compiler.macroexpand (Compiler.java:7075)
clojure.lang.Compiler.eval (Compiler.java:7161)
clojure.lang.Compiler.load (Compiler.java:7636)
clojure.lang.RT.loadResourceScript (RT.java:381)
clojure.lang.RT.loadResourceScript (RT.java:372)
clojure.lang.RT.load (RT.java:459)
clojure.lang.RT.load (RT.java:424)
clojure.core/load/fn--6839 (core.clj:6126)
clojure.core/load (core.clj:6125)
clojure.core/load (core.clj:6109)
clojure.core/load-one (core.clj:5908)
Caused by:
NullPointerException
clojure.lang.Compiler.maybeResolveIn (Compiler.java:7424)
clojure.core/ns-resolve (core.clj:4370)
clojure.core/ns-resolve (core.clj:4359)
clojure.core/resolve (core.clj:4372)
clojure.core/resolve (core.clj:4372)
clojure.core/map/fn--5866 (core.clj:2753)
clojure.lang.LazySeq.sval (LazySeq.java:42)
clojure.lang.LazySeq.seq (LazySeq.java:51)
clojure.lang.RT.seq (RT.java:535)
clojure.core/seq--5402 (core.clj:137)
clojure.core/reduce1 (core.clj:930)
clojure.core/set (core.clj:4113)
There is some suggestion that the issue is coming up because I'm including CLJ function calls in CLJS and shadow doesn't know what to do with it: https://clojurians.slack.com/archives/C68M60S4F/p1626790359069100?thread_ts=1625841427.419200&cid=C68M60S4F
Any suggestions for a fix? I can't seem to get around this one.its not part of shadow-cljs compilation. that completed. so your REPL is trying to do something but I can't tell what
👍 4
I'm having hard time connecting to cljs REPL, I do this:
(require '[shadow.cljs.devtools.server :as server])
(require '[shadow.cljs.devtools.api :as shadow])
(server/start!)
(shadow/watch :app)
(shadow/nrepl-select :app)
and everything but the last step works fine. The last step fails with :missing-nrepl-middleware
.
Where should I dig?