<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions tagged cljs</title>
<link>https://ask.clojure.org/index.php/tag/cljs</link>
<description></description>
<item>
<title>Executable 'java' not found on system path.</title>
<link>https://ask.clojure.org/index.php/13592/executable-java-not-found-on-system-path</link>
<description>&lt;p&gt;Hi guys I,m basically trying to run a clojure script app using a shadow file, to be honest i don't really know too much about clojure since this is a project that i downloaded, but i need it to make it run locally on windows 11 and i'm receiving the following error&lt;/p&gt;
&lt;p&gt;shadow-cljs - config: C:\Appsmiths\i\src\winglue\webglue\shadow-cljs.edn&lt;br&gt;
===== ERROR =================&lt;/p&gt;
&lt;h2&gt;Executable 'java' not found on system path.&lt;/h2&gt;
&lt;p&gt;I have java on my system of course and my environment variables are well configured, so i think it could be something inside of the shadow file, but i cannot identify what it is, if you can help me out with this it would be really helpful&lt;/p&gt;
&lt;p&gt;this is basically all the shadow config:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;;; shadow-cljs configuration
{:dependencies [
                [akiroz.re-frame/storage &quot;0.1.3&quot;]
                [bidi &quot;2.1.5&quot;]
                [com.cemerick/url &quot;0.1.1&quot;]
                [binaryage/devtools &quot;1.0.2&quot;]
                [binaryage/oops &quot;0.7.1&quot;]
                [com.cognitect/transit-cljs &quot;0.8.256&quot;]
                [com.rpl/specter &quot;1.1.3&quot;]
                [com.taoensso/timbre &quot;4.10.0&quot;]
                [cljs-http &quot;0.1.46&quot;]
                [day8.re-frame/async-flow-fx &quot;0.1.0&quot;]
                [day8.re-frame/http-fx &quot;0.1.6&quot;]
                [day8.re-frame/re-frame-10x &quot;1.5.0&quot;]
                [day8.re-frame/tracing &quot;0.5.1&quot;]
                [day8.re-frame/undo &quot;0.3.2&quot;]
                [district0x/graphql-query &quot;1.0.6&quot;]
                [district0x/re-frame-interval-fx &quot;1.0.2&quot;]
                [expound &quot;0.8.5&quot;]
                [funcool/cuerdas &quot;2021.05.29-0&quot;]
                [funcool/promesa &quot;2.0.1&quot;]
                [juji/editscript &quot;0.4.6&quot;]
                [maximgb/re-state &quot;1.5.0&quot;]
                [medley &quot;1.2.0&quot;]
                [metosin/spec-tools &quot;0.10.4&quot;]
                [org.clojure/data.json &quot;0.2.6&quot;]
                [org.clojure/spec.alpha &quot;0.2.187&quot;]
                [pez/clerk &quot;1.0.0&quot;]
                [prismatic/schema &quot;1.1.12&quot;]
                [re-frame &quot;1.3.0&quot;]
                [re-graph &quot;0.1.15&quot; :exclusions [cljs-http]]
                [com.andrewmcveigh/cljs-time &quot;0.5.2&quot;]
                [reagent &quot;1.1.1&quot;]
                [spyscope &quot;0.1.6&quot;]
                [venantius/accountant &quot;0.2.5&quot;]
                [lambdaisland/regal &quot;0.0.143&quot;]
                [cheshire &quot;5.11.0&quot;]
                [camel-snake-kebab &quot;0.4.3&quot;]
                [garden/garden-units &quot;1.0.0-RC2&quot;]
                [cljs-bean &quot;1.8.0&quot;]]

 :source-paths [&quot;lib&quot; &quot;graphql&quot; &quot;src&quot; &quot;C:/Appsmiths/i/src/winglue-artifact/webglue&quot; &quot;test&quot;]
 :nrepl {:port 41002}
 :open-file-command [&quot;idea &quot; :pwd &quot; --line &quot; :line :file]
 ;; webglue artifact are in /i/src/winglue-artifact/webglue/js
 :builds {:app {:output-dir &quot;C:/Appsmiths/i/src/winglue-artifact/webglue/js&quot;
                :asset-path &quot;/js&quot;
                :compiler-options
                {:optimizations :none
                 ;; use es2018 for recat-markdown-editor
                 :output-feature-set :es2018
                 :main webglue.core
                 :closure-warnings {:global-this :off}
                 :closure-defines {re-frame.trace/trace-enabled? true
                                   day8.re-frame-10x.debug?             true
                                   day8.re-frame.tracing.trace-enabled? true}
                 :external-config {:devtools/config {:features-to-install    [:formatters :hints]
                                                     :fn-symbol              &quot;Fn&quot;
                                                     :print-config-overrides true}}}
                :target :browser
                :js-options {:ignore-asset-requires true}
                :module-loader true
                :modules {:webglue
                          {:entries [webglue.core]}
                          :ag-grid
                          {:entries [webglue.components.ag-grid]
                           :depends-on #{:webglue}}
                          :dev
                          {:entries [webglue.pages.component-show-case webglue.pages.dev]
                           :depends-on #{:webglue}}
                          :plot
                          {:entries [webglue.component-generator.graph
                                     webglue.component-generator.ivsp-plot
                                     webglue.component-generator.pie-chart
                                     webglue.component-generator.bar-chart
                                     webglue.component-generator.bubble-chart]
                           :depends-on #{:webglue}}}
                :devtools {:repl-pprint true
                           :after-load webglue.core/reload!
                           :loader-mode :eval
                           :http-root &quot;C:/Appsmiths/i/src/winglue-artifact/webglue&quot;
                           :http-port 3333
                           :http-handler shadow.http.push-state/handle
                           :preloads [devtools.preload
                                      ; use only for debug re-frame, this option wil take 300 ms to reload and 330 file to watch
                                      ; run by uncomment next line, and save. shadow-cljs will do the rest
                                      day8.re-frame-10x.preload]}}
          :win-app {:output-dir &quot;C:/Appsmiths/i/src/winglue-artifact/webglue&quot;
                    :asset-path &quot;/js&quot;
                    :compiler-options
                    {:optimizations :none
                     :output-feature-set :es2018
                     :main webglue.core
                     :closure-warnings {:global-this :off}
                     :closure-defines {re-frame.trace/trace-enabled? true
                                       day8.re-frame-10x.debug?             true
                                       day8.re-frame.tracing.trace-enabled? true}
                     :external-config {:devtools/config {:features-to-install    [:formatters :hints]
                                                         :fn-symbol              &quot;Fn&quot;
                                                         :print-config-overrides true}}}
                    :target :browser
                    :js-options {:ignore-asset-requires true}
                    :modules {:webglue {:entries [webglue.core]}}
                    :devtools {:http-port 3434
                               :http-root &quot;C:/Appsmiths/i/src/winglue-artifact/webglue&quot;
                               :http-handler shadow.http.push-state/handle
                               :after-load webglue.core/reload!
                               :loader-mode :eval
                               :preloads [devtools.preload
                                          day8.re-frame-10x.preload]}}
          :test {:target :browser-test
                 :test-dir &quot;test-assets&quot;
                 :devtools {:http-port 9100
                            :http-root &quot;test-assets&quot;}
                 :runner-ns main-test-initial
                 :js-options {:ignore-asset-requires true}
                 :ns-regexp &quot;-test$&quot;}

          :app-release {:target :browser
                        :modules {:webglue
                                  {:entries [webglue.core]}}
                        :js-options {:ignore-asset-requires true}
                        :compiler-options {:source-map false
                                           :output-feature-set :es2018
                                           :main  webglue.core
                                           :closure-defines {}}
                        :release  {:output-dir &quot;C:/Appsmiths/i/src/winglue-artifact/webglue/js&quot;}}

          :tao2py-release {:target :browser
                           :js-options {:ignore-asset-requires true}
                           :compiler-options
                           {:source-map false
                            :output-feature-set :es2018
                            :main  webglue.core
                            :closure-defines {webglue.config/tao2py-release true
                                              ;; landing page is page key in webglue.route_pages
                                              webglue.config/landing-page &quot;field-overview&quot;}}
                           :release  {:output-dir &quot;C:/Appsmiths/i/src/winglue-artifact/webglue/js&quot;
                                      :asset-path &quot;/js&quot;}
                           :module-loader true
                           :modules {:webglue
                                     {:entries [webglue.core]}
                                     :ag-grid
                                     {:entries [webglue.components.ag-grid]
                                      :depends-on #{:webglue}}
                                     :dev
                                     {:entries [webglue.pages.component-show-case webglue.pages.dev]
                                      :depends-on #{:webglue}}
                                     :plot
                                     {:entries [webglue.component-generator.graph
                                                webglue.component-generator.ivsp-plot
                                                webglue.component-generator.pie-chart
                                                webglue.component-generator.bar-chart
                                                webglue.component-generator.bubble-chart]
                                      :depends-on #{:webglue}}}}

          :tao2py-testing {:target :browser
                           :modules {:webglue
                                     {:entries [webglue.core]}}
                           :js-options {:ignore-asset-requires true}
                           :compiler-options {:source-map false
                                              :output-feature-set :es2018
                                              :main  webglue.core
                                              :closure-defines {}}
                           :release  {:output-dir &quot;C:/Appsmiths/i/src/winglue-artifact/webglue/js&quot;}}

          :budger-release {:target :browser
                           :modules {:webglue {:entries [webglue.core]}}
                           :release {:output-dir &quot;release/js&quot;}
                           :js-options {:ignore-asset-requires true}
                           :compiler-options {:source-map false
                                              :output-feature-set :es2018
                                              :main       webglue.core
                                              :closure-defines {}}}}}
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Compiler</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13592/executable-java-not-found-on-system-path</guid>
<pubDate>Wed, 03 Jan 2024 19:38:51 +0000</pubDate>
</item>
<item>
<title>cljs compile warning: JavaScript file found on classpath for library `...`, but does not contain a corresponding...</title>
<link>https://ask.clojure.org/index.php/12946/compile-warning-javascript-classpath-library-corresponding</link>
<description>&lt;p&gt;First, thanks for cljs, it's the best way to do frontends and it's one of the lifebloods of our business. We are super-grateful.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;I am running some older code in a new project that has an updated cljs dependency and I am now getting an interesting compile warning:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;WARNING: JavaScript file found on classpath for library `goog.net.cookies`, but does not contain a corresponding `goog.provide` declaration: jar:file:/home/harold/.m2/repository/org/clojure/google-closure-library/0.0-20211011-0726fdeb/google-closure-library-0.0-20211011-0726fdeb.jar!/goog/net/cookies.js
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Everything seems to be working fine, but I am still interested in cleaning up this output.&lt;/p&gt;
&lt;p&gt;I built a simple (two tiny file) project that reproduces the problem:&lt;br&gt;
 - &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/harold/cookie-repro&quot;&gt;https://github.com/harold/cookie-repro&lt;/a&gt;&lt;br&gt;
 - You can clone that and then do:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;lein cljsprod
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;p&gt;I did a 'bisect'-ish operation on the cljs deps in maven and found that the warning started to appear with version &lt;code&gt;1.10.891&lt;/code&gt;: &lt;br&gt;
 - &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojurescript/blob/master/changes.md#110891&quot;&gt;https://github.com/clojure/clojurescript/blob/master/changes.md#110891&lt;/a&gt;&lt;br&gt;
 - Before that version, the warning is not seen&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Wondering if others have seen this warning, or similar, and what, if any, steps would be good to take.&lt;/p&gt;
&lt;p&gt;Thanks again for your time and consideration!&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12946/compile-warning-javascript-classpath-library-corresponding</guid>
<pubDate>Wed, 17 May 2023 17:23:07 +0000</pubDate>
</item>
<item>
<title>`apply` behaves differently in clj/cljs with empty argument</title>
<link>https://ask.clojure.org/index.php/12051/apply-behaves-differently-in-clj-cljs-with-empty-argument</link>
<description>&lt;p&gt;In &lt;code&gt;cljs&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ClojureScript 1.10.238
app:cljs.user=&amp;gt; (defn f [a] a) (f)
#'cljs.user/f
----  Compiler Warning on   &amp;lt;cljs form&amp;gt;   line:1  column:2  ----

  Wrong number of args (0) passed to cljs.user/f

  1  (f)
     ^--- 

----  Compiler Warning  ----
nil
app:cljs.user=&amp;gt; (defn f [a] a) (apply f [])
#'cljs.user/f
nil
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;p&gt;In &lt;code&gt;clj&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; (defn f [a] a) (f)
#'redacted.ns/f
Execution error (ArityException) at redacted.ns/eval28662 (form-init217321140160545149.clj:2261).
Wrong number of args (0) passed to: redacted.ns/f
&amp;gt; (defn f [a] a) (apply f [])
#'redacted.ns/f
Execution error (ArityException) at redacted.ns/eval28665 (form-init217321140160545149.clj:2265).
Wrong number of args (0) passed to: redacted.ns/f
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;p&gt;In cljs, apply silently returns &lt;code&gt;nil&lt;/code&gt;, while in clj, an &lt;code&gt;ArityException&lt;/code&gt; is thrown.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12051/apply-behaves-differently-in-clj-cljs-with-empty-argument</guid>
<pubDate>Mon, 11 Jul 2022 17:39:15 +0000</pubDate>
</item>
<item>
<title>Expected difference in clj/cljs behavior with `(apply max [])`?</title>
<link>https://ask.clojure.org/index.php/12045/expected-difference-in-clj-cljs-behavior-with-apply-max</link>
<description>&lt;p&gt;In &lt;code&gt;cljs&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;app:cljs.user=&amp;gt; (apply max [])
nil
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;p&gt;In &lt;code&gt;clj&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; (apply max [])
Execution error (ArityException) at redacted.ns/eval26821 (form- 
init217321140160545149.clj:741).
Wrong number of args (0) passed to: clojure.core/max
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;p&gt;Not sure which behavior I prefer (maybe cljs?), but this results in surprising-to-me outcomes in our application.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12045/expected-difference-in-clj-cljs-behavior-with-apply-max</guid>
<pubDate>Mon, 11 Jul 2022 16:56:19 +0000</pubDate>
</item>
<item>
<title>Different behavior of reduced in clj and cljs</title>
<link>https://ask.clojure.org/index.php/12036/different-behavior-of-reduced-in-clj-and-cljs</link>
<description>&lt;p&gt;I stumbled upon this by accident&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Clojure&lt;/em&gt;&lt;br&gt;
&lt;code&gt;(get {:x (reduced 10)} :x)&lt;/code&gt;&lt;br&gt;
&lt;code&gt;=&amp;gt; #object[clojure.lang.Reduced 0x28494b99 {:status :ready, :val 10}]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;(get-in {:x (reduced 10)} [:x])&lt;/code&gt;&lt;br&gt;
&lt;code&gt;=&amp;gt; #object[clojure.lang.Reduced 0x28494b99 {:status :ready, :val 10}]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Clojurescript&lt;/em&gt;&lt;br&gt;
&lt;code&gt;(get {:x (reduced 10)} :x)&lt;/code&gt; &lt;br&gt;
&lt;code&gt;=&amp;gt; #object[cljs.core.Reduced]&lt;/code&gt; ; Same behavior as Clojure&lt;br&gt;
&lt;code&gt;(get-in {:x (reduced 10)} [:x])&lt;/code&gt;&lt;br&gt;
&lt;code&gt;=&amp;gt; 10&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;So &lt;code&gt;get-in&lt;/code&gt; seems to automatically &lt;code&gt;deref&lt;/code&gt; the &lt;code&gt;reduced&lt;/code&gt; value in Clojurescript?&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12036/different-behavior-of-reduced-in-clj-and-cljs</guid>
<pubDate>Tue, 05 Jul 2022 19:33:28 +0000</pubDate>
</item>
<item>
<title>How does newer Clojure release features make it into cljs?</title>
<link>https://ask.clojure.org/index.php/11586/how-does-newer-clojure-release-features-make-it-into-cljs</link>
<description>&lt;p&gt;Recently learned of Clojure 1.11 passing in single map args to keyword functions and looking forward to leveraging it in cljs.&lt;/p&gt;
&lt;p&gt;Out of curiosity, does anyone know the process for how newer Clojure features make their way into cljs? Is it up to the community to port the code and cut a release? Is it up to maintainers of projects like shadow-cljs to update their deps?&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11586/how-does-newer-clojure-release-features-make-it-into-cljs</guid>
<pubDate>Thu, 17 Feb 2022 06:31:07 +0000</pubDate>
</item>
<item>
<title>How  does cljs require npm package</title>
<link>https://ask.clojure.org/index.php/10706/how-does-cljs-require-npm-package</link>
<description>&lt;p&gt;Hi everyone, I setup a demo to explore how cljs could require a npm package, I install two npm packages &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.npmjs.com/package/puppeteer&quot;&gt;puppeteer&lt;/a&gt; and &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.npmjs.com/package/pdfjs&quot;&gt;pdfjs&lt;/a&gt;  via &lt;code&gt;npm install&lt;/code&gt;,  and require them in ns statement, puppeteer works fine, but pdfs failed, it seems strange to me as those two packages are required in the same way.&lt;/p&gt;
&lt;p&gt;Steps to reproduce:&lt;br&gt;
1. clone &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/jiacai2050/cljs-demo.git&quot;&gt;https://github.com/jiacai2050/cljs-demo.git&lt;/a&gt;&lt;br&gt;
2. comment out pdfjs in core.cljs&lt;br&gt;
3. npm install&lt;br&gt;
4. lein dev-build&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10706/how-does-cljs-require-npm-package</guid>
<pubDate>Sat, 19 Jun 2021 12:15:55 +0000</pubDate>
</item>
<item>
<title>What's up with this difference between reading UUIDs in edn between clj and cljs?</title>
<link>https://ask.clojure.org/index.php/10524/whats-with-this-difference-between-reading-uuids-between-cljs</link>
<description>&lt;p&gt;Hello! As ever, super-grateful for cljs - it's a huge multiplier on our efforts and we continue to love it as we use it all day long every day.&lt;/p&gt;
&lt;p&gt;After upgrading clojurescript versions,  we started getting a strange &lt;code&gt;read-string&lt;/code&gt; related error: &quot;No reader function for tag uuid.&quot;&lt;/p&gt;
&lt;h2&gt;cljs repl:&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;ClojureScript 1.10.238
app:cljs.user=&amp;gt; (cljs.tools.reader.edn/read-string &quot;#uuid \&quot;eed86fd1-4110-44d8-8f41-27473029cc6a\&quot;&quot;)
#error {:message &quot;No reader function for tag uuid.&quot;, :data {:type :reader-exception, :ex-kind :reader-error}}
   new (jar:file:/home/harold/.m2/repository/org/clojure/clojurescript/1.10.238/clojurescript-1.10.238.jar!/cljs/core.cljs:11123:11)
   Function.cljs$core$IFn$_invoke$arity$3 (jar:file:/home/harold/.m2/repository/org/clojure/clojurescript/1.10.238/clojurescript-1.10.238.jar!/cljs/core.cljs:11155:5)
   Function.cljs$core$IFn$_invoke$arity$2 (jar:file:/home/harold/.m2/repository/org/clojure/clojurescript/1.10.238/clojurescript-1.10.238.jar!/cljs/core.cljs:11153:16)
   cljs.core/ex-info (jar:file:/home/harold/.m2/repository/org/clojure/clojurescript/1.10.238/clojurescript-1.10.238.jar!/cljs/core.cljs:11150:1)
   Function.cljs$core$IFn$_invoke$arity$variadic (jar:file:/home/harold/.m2/repository/org/clojure/tools.reader/1.3.3/tools.reader-1.3.3.jar!/cljs/tools/reader/impl/errors.cljs:37:13)
   cljs.tools.reader.impl.errors/throw-ex (jar:file:/home/harold/.m2/repository/org/clojure/tools.reader/1.3.3/tools.reader-1.3.3.jar!/cljs/tools/reader/impl/errors.cljs:26:1)
   Function.cljs$core$IFn$_invoke$arity$variadic (jar:file:/home/harold/.m2/repository/org/clojure/tools.reader/1.3.3/tools.reader-1.3.3.jar!/cljs/tools/reader/impl/errors.cljs:43:4)
   cljs.tools.reader.impl.errors/reader-error (jar:file:/home/harold/.m2/repository/org/clojure/tools.reader/1.3.3/tools.reader-1.3.3.jar!/cljs/tools/reader/impl/errors.cljs:39:1)
   cljs.tools.reader.impl.errors/throw-unknown-reader-tag (jar:file:/home/harold/.m2/repository/org/clojure/tools.reader/1.3.3/tools.reader-1.3.3.jar!/cljs/tools/reader/impl/errors.cljs:221:4)
   cljs$tools$reader$edn$read_tagged (jar:file:/home/harold/.m2/repository/org/clojure/tools.reader/1.3.3/tools.reader-1.3.3.jar!/cljs/tools/reader/edn.cljs:372:10)

app:cljs.user=&amp;gt; (cljs.tools.reader.edn/read-string {:readers {'uuid uuid}} &quot;#uuid \&quot;eed86fd1-4110-44d8-8f41-27473029cc6a\&quot;&quot;)
#uuid &quot;eed86fd1-4110-44d8-8f41-27473029cc6a&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;clj repl:&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; (clojure.edn/read-string &quot;#uuid \&quot;eed86fd1-4110-44d8-8f41-27473029cc6a\&quot;&quot;)
#uuid &quot;eed86fd1-4110-44d8-8f41-27473029cc6a&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;p&gt;Previously, reading edn behaved more similarly between cljs and clj. I found the workaround of passing the map as the first argument by looking at the tests in tools.reader.&lt;/p&gt;
&lt;p&gt;Is this expected?&lt;/p&gt;
&lt;p&gt;Thanks for your time and consideration.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10524/whats-with-this-difference-between-reading-uuids-between-cljs</guid>
<pubDate>Mon, 26 Apr 2021 16:43:57 +0000</pubDate>
</item>
<item>
<title>cljs.analyzer macroexpand doesn't work</title>
<link>https://ask.clojure.org/index.php/9489/cljs-analyzer-macroexpand-doesnt-work</link>
<description>&lt;p&gt;Related discussion:&lt;br&gt;
- &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure-emacs/cider/issues/2099#issuecomment-661940099&quot;&gt;https://github.com/clojure-emacs/cider/issues/2099#issuecomment-661940099&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(ns user
  (:require [cljs.analyzer :as analyzer]))

(let [ns-env (assoc-in (analyzer/empty-env) [:ns [:name]] 'cljs.user)]
  (analyzer/macroexpand-1 ns-env `(defn ~'foo [~'x] ~'x)))
;; (clojure.core/defn foo [x] x)

(macroexpand-1 `(defn ~'foo [~'x] ~'x))
;; (def foo (clojure.core/fn ([x] x)))
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/9489/cljs-analyzer-macroexpand-doesnt-work</guid>
<pubDate>Tue, 21 Jul 2020 16:13:21 +0000</pubDate>
</item>
<item>
<title>Proper deps.edn config with -co option of cljs.main</title>
<link>https://ask.clojure.org/index.php/9439/proper-deps-edn-config-with-co-option-of-cljs-main</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am trying translate the following cljs.main options with the CLI:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ clj -m cljs.main          \
      -d public/js/compiled \
      -o public/js/main.js  \
      -O advanced           \
      -c hello-world.core
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Into &lt;code&gt;deps.edn&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:deps {org.clojure/clojurescript {:mvn/version &quot;1.10.764&quot;}
        reagent {:mvn/version &quot;1.0.0-alpha2&quot;}}
 :main &quot;hello-world.core&quot;
 :optimizations :advanced
 :output-dir &quot;public/js/compiled&quot;
 :output-to &quot;public/js/main.js&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then execute it with:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clj -m cljs.main -co deps.edn
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However, it doesn't seem to work.&lt;/p&gt;
&lt;p&gt;I also get the following error using the generated &lt;code&gt;main.js&lt;/code&gt; file:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;main.js:314 Uncaught TypeError: Cannot read property 'mg' of undefined
    at Mb (main.js:314)
    at Tn (main.js:699)
    at Rn (main.js:698)
    at Nn.h.Me (main.js:718)
    at Function.Wn.A (main.js:710)
    at Nn.h.Le (main.js:718)
    at Function.Wn.j (main.js:710)
    at ep (main.js:761)
    at main.js:761
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Some thoughts&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Am I missing a CLI option? or &lt;code&gt;deps.edn&lt;/code&gt; key/value pair?&lt;/li&gt;
&lt;li&gt;Am I using it wrong; the CLI or &lt;code&gt;deps.edn&lt;/code&gt; or both?&lt;/li&gt;
&lt;li&gt;Or is it not well supported at the moment so I should just stick with the CLI?&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/9439/proper-deps-edn-config-with-co-option-of-cljs-main</guid>
<pubDate>Thu, 09 Jul 2020 15:55:05 +0000</pubDate>
</item>
<item>
<title>why browser env need xpc to connect REPL server?</title>
<link>https://ask.clojure.org/index.php/8898/why-browser-env-need-xpc-to-connect-repl-server</link>
<description>&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://alan.leung.work/blog/post/clojurescript-and-the-repl/&quot;&gt;https://alan.leung.work/blog/post/clojurescript-and-the-repl/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This post explain how a CLJS repl works really well, but I have one issue on why do we need xpc to send evaled-respones back to REPL?&lt;/p&gt;
&lt;p&gt; Isn't the page auto-opened  already hosted on localhost:9000?&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/8898/why-browser-env-need-xpc-to-connect-repl-server</guid>
<pubDate>Mon, 25 Nov 2019 13:24:36 +0000</pubDate>
</item>
<item>
<title>Compiling shadow-cljs projects with NPM transitive dependency conflicts</title>
<link>https://ask.clojure.org/index.php/8665/compiling-shadow-projects-transitive-dependency-conflicts</link>
<description>&lt;p&gt;I am attempting to make use of the &lt;code&gt;react-bootstrap&lt;/code&gt; module by leveraging NPM support in &lt;code&gt;shadow-cljs&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;First I add &lt;code&gt;react-bootstrap&lt;/code&gt; and &lt;code&gt;bootstrap&lt;/code&gt; to &lt;code&gt;package.json&lt;/code&gt;:&lt;br&gt;
&lt;code&gt;$ yarn add react-bootstrap bootstrap&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;And then require &lt;code&gt;react-bootstrap&lt;/code&gt; in my project:&lt;br&gt;
&lt;code&gt;(ns myproject.core
  (:require [&quot;react-bootstrap&quot; :as bs]))&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The result is a runtime exception in the console:&lt;br&gt;
&lt;code&gt;TypeError: (0 , _uncontrollable.default) is not a function&lt;/code&gt;&lt;br&gt;
... which curiously goes away after the first hot-reload.&lt;/p&gt;
&lt;p&gt;The exception likely indicates a conflict in a nested NPM dependency. How can I identity and resolve the problem?&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/8665/compiling-shadow-projects-transitive-dependency-conflicts</guid>
<pubDate>Thu, 26 Sep 2019 18:08:41 +0000</pubDate>
</item>
</channel>
</rss>