This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-05
Channels
- # announcements (10)
- # beginners (59)
- # calva (172)
- # cider (13)
- # clj-kondo (1)
- # cljdoc (10)
- # cljs-dev (4)
- # cljsrn (65)
- # clojure (144)
- # clojure-europe (2)
- # clojure-italy (26)
- # clojure-losangeles (1)
- # clojure-nl (14)
- # clojure-spec (26)
- # clojure-uk (91)
- # clojurescript (75)
- # core-async (53)
- # cursive (11)
- # datomic (16)
- # fulcro (42)
- # graalvm (29)
- # graphql (9)
- # kaocha (3)
- # leiningen (22)
- # off-topic (26)
- # qa (1)
- # re-frame (3)
- # reagent (7)
- # reitit (10)
- # rewrite-clj (56)
- # robots (1)
- # shadow-cljs (107)
- # spacemacs (10)
- # specter (5)
- # sql (15)
- # tools-deps (39)
- # vim (11)
@lilactown after running my main, I’m trying to call (start) in the browser repl
It seems I am running into this bug: https://github.com/thheller/shadow-cljs/issues/502 Does anyone know if there is workaround for this?
I think this is problem: https://www.npmjs.com/package/readable-stream
Works you are an absolute legend
I am trying to use the readoc React component and I get this error:
Error: Error downloading
process.nextTick is not a function
at eval (/js/cljs-runtime/module$node_modules$ono$lib$ono.js:2:90)
at eval (/js/cljs-runtime/module$node_modules$json_schema_ref_parser$lib$resolvers$http.js:2:397)
TypeError: process.nextTick is not a function
at Object.nextTick (/js/cljs-runtime/module$node_modules$process_nextick_args$index.js:1:413)
at addChunk (/js/cljs-runtime/module$node_modules$readable_stream$lib$_stream_readable.js:8:88)
at readableAddChunk (/js/cljs-runtime/module$node_modules$readable_stream$lib$_stream_readable.js:7:118)
at exports.IncomingMessage.Readable.push (/js/cljs-runtime/module$node_modules$readable_stream$lib$_stream_readable.js:18:68)
at eval (/js/cljs-runtime/module$node_modules$stream_http$lib$response.js:3:393)
at new Promise (<anonymous>)
at Object.write (/js/cljs-runtime/module$node_modules$stream_http$lib$response.js:3:326)
I am trying to use the redoc React component and I get this error:
Error: Error downloading
process.nextTick is not a function
at eval (/js/cljs-runtime/module$node_modules$ono$lib$ono.js:2:90)
at eval (/js/cljs-runtime/module$node_modules$json_schema_ref_parser$lib$resolvers$http.js:2:397)
TypeError: process.nextTick is not a function
at Object.nextTick (/js/cljs-runtime/module$node_modules$process_nextick_args$index.js:1:413)
at addChunk (/js/cljs-runtime/module$node_modules$readable_stream$lib$_stream_readable.js:8:88)
at readableAddChunk (/js/cljs-runtime/module$node_modules$readable_stream$lib$_stream_readable.js:7:118)
at exports.IncomingMessage.Readable.push (/js/cljs-runtime/module$node_modules$readable_stream$lib$_stream_readable.js:18:68)
at eval (/js/cljs-runtime/module$node_modules$stream_http$lib$response.js:3:393)
at new Promise (<anonymous>)
at Object.write (/js/cljs-runtime/module$node_modules$stream_http$lib$response.js:3:326)
hey folks, is there any way to instruct shadow-cljs to not include a namespace in the final build ?
I have like several functions in my cljs code, i have a macro which reads a configuration file and create a new function that calls two of these functions in cljs
those cljs functions spread through several NSs, in order for the macro to work i need to either require all of those namespaces
or i have to be able to manipulate the ns form ( for requirements ) on compile time to avoid having all the functions in the final build
created functions uses only two function out of possible 10 ( based on the configuration ).
I create a function using a macro based on some configuration that may only use two of them
since in cljs app i don't know which before hand and I can't manipulate the ns form of the main namespace ( the one which i use the macro in it )
@thheller https://gitlab.com/devheroes/webman/blob/master/src/clj/webman/pages.clj#L48
option a) generate a .cljs
files from your config and just compile that file normally
:modules {:app {:init-fn webman.core/init :entries [webman.page.foo webman.page.bar]}}
(ns webman.page.foo (:require [some.registry :as reg])) (reg/add-page ::foo {:bla "blubb"})
@thheller it's totally possible to alter the build configuration via a hook for :configure
stage, right ?
if you are thinking about doing that I would STRONGLY suggest going with option a) instead
build-hooks are several orders of magnitude more complex than a simple clojure function that spits out something like (ns app.main (:require [foo.bar]))
with all the namespaces you are trying to dynamically add
only because you can in theory solve the problem using the build tool doesn't mean you should
you can use the clj-run
feature to generate it so shadow-cljs run webman.generate path/to/config.edn path/to/output.cljs
but its much easier to verify that the output you wanted is correct just by looking at the generated output
build hooks that deal with configuration aspects always get problematic since you are then responsible to keeping everything in sync
Anyone else all of a sudden getting Use of undeclared Var cljs.core/destructure-map
on compiles today?
i have a strange behavior here ... In dev mode I require [datascript.transit :as dst]
the namespace compiles fine, but when i try to make use of it, it says datascript.transit is null... which it is : (log js/datascript.transit)
indeed is null, while (log js/datascript)
has the whole datascript namespaces showing
ok scratch that, that's again the lack of refresh of the extension for added namespaces to a background page
@shanelester55 uhm did I mess something up? I was working on a CLJS patch that changes destructuring a bit
If your project uses React 16 and Reagent 0.8.0-alpha2 (or higher) then you will need to add the qualifier -react16 to the version, e.g. [day8.re-frame/re-frame-10x "VERSION-react16"]
awesome, thanks for the quick response. I am giving it a shot right now
Would the syntax for the above be something like in my shadow-cljs.edn
...
:dependencies
[[day8.re-frame/re-frame-10x "0.4.0-react16"]]
...
cli version: 2.8.37 node: v12.3.1
shadow-cljs - updating dependencies
shadow-cljs - dependency update failed - Could not find artifact day8.re-frame:re-frame-10x:jar:0.4.0-react16 in central ( )
DependencyResolutionException Could not find artifact day8.re-frame:re-frame-10x:jar:0.4.0-react16 in central ( )
org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies (DefaultRepositorySystem.java:355)
sun.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2)
sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke (Method.java:498)
clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:93)
clojure.lang.Reflector.invokeInstanceMethod (Reflector.java:28)
cemerick.pomegranate.aether/resolve-dependencies* (aether.clj:806)
cemerick.pomegranate.aether/resolve-dependencies* (aether.clj:707)
clojure.core/apply (core.clj:657)
clojure.core/apply (core.clj:652)
cemerick.pomegranate.aether/resolve-dependencies (aether.clj:815)
I’m trying to install re-frame-10x
. If I ignore the -react16
qualifier I can see the re-frame-10x
panel but it is not reflecting the info in the app-db
, it is just empty
@stefan.age there does not seem to be a 0.4.0-react16 version? https://clojars.org/day8.re-frame/re-frame-10x/versions
How do polyfills work with shadow-cljs? Been having an issue recently trying to play around with a browser js dependency from cljs due to a dependency requiring util
and stream
.
actually looks like I can just resolve those from the window. Now running into closure compilation complaints about duplicate classnames in dependencies. Search goes on :man-shrugging: