This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-26
Channels
- # announcements (6)
- # beginners (328)
- # boot (2)
- # cider (72)
- # clara (6)
- # cljdoc (4)
- # cljsrn (5)
- # clojure (78)
- # clojure-europe (3)
- # clojure-italy (22)
- # clojure-nl (4)
- # clojure-spec (3)
- # clojure-uk (114)
- # clojurescript (22)
- # clojurex (54)
- # copenhagen-clojurians (1)
- # core-async (20)
- # cursive (8)
- # data-science (1)
- # datomic (22)
- # duct (11)
- # emacs (32)
- # events (1)
- # figwheel (2)
- # fulcro (18)
- # graalvm (53)
- # graphql (39)
- # luminus (6)
- # nrepl (6)
- # off-topic (53)
- # om (1)
- # re-frame (8)
- # reagent (19)
- # reitit (3)
- # shadow-cljs (28)
- # spacemacs (10)
- # sql (37)
- # tools-deps (33)
- # vim (9)
- # xtdb (6)
I wanted to build a Wrapper around ReactStrap. How do I include ReactStrap’s JS file and ship it with my project ? Is including the closure as a foreign library enough ?
Is it enough to add my dependency to the output ? Or the developer should include it again ?
Hi everyone, I've got a problem with using clojurescript foreign libs in node that I'd like some advice on.
In quite a few cases, js scripts inside foreign-lib/cljsjs libraries to have this umd wrapper that checks the js environment and assigns a global variable, regardless of the current state. Here's an example of what you get with cljsjs/react
: https://unpkg.com/[email protected]/umd/react-dom.development.js
When running cljs on node, either a script or with repl commands (e.g. clj -m cljs.main -re node -m myscript
), the js script is re-run every time you do a foreign lib require, e.g. (require 'cljsjs/react)
. In the case of cljsjs/react, this means the global js/React variable is reassigned to the result of running the script. This is unlike the behaviour that require
has normally unless you do a (require ... :reload)
and is different to what you get when running cljs in a browser.
Is this a bug, or by design?
foreign-libs are not really meant for node environments so I'd expect that to have all sorts of issues
It's true that if everyone were just targeting node, there'd be no need for foreign-libs and cljsjs. This does leave the question for how to write cljs libs (for node and browser) that depend on npm libraries. I heard npm-deps is deprecated now
hi, suddenly when start cider cljs in the re-frame template project i get
error in process filter: nrepl-send-sync-request: Sync nREPL request timed out (op eval code (require 'figwheel-sidecar.repl))
error in process filter: Sync nREPL request timed out (op eval code (require 'figwheel-sidecar.repl))
Do you have a value set for {:cljsbuild ...{:repl-options {:timeout ...}..} ?
i ran that, and then in the project.clj file ran C-c M-J
(cider-jack-in-clojurescript). It cranked right up for me and http://0.0.0.0:3449/ has the app. Are you sure you ran the clojurescript command?
can you look in *Messages*
buffer for what command cider used to startup? Mine used /home/dan/bin/lein update-in :dependencies conj \[nrepl\ \"0.6.0\"\] -- update-in :dependencies conj \[cider/piggieback\ \"0.4.1\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.22.0-beta6\"\] -- repl :headless :host localhost
Since today I started seeing (without updating any dep):
WARNING: no :cljsbuild entry found in project definition.
--------------------------------------------------------------------------------
WARNING: your :cljsbuild configuration is in a deprecated format. It has been
automatically converted it to the new format, which will be printed below.
It is recommended that you update your :cljsbuild configuration ASAP.
--------------------------------------------------------------------------------
:cljsbuild
{:builds []}
--------------------------------------------------------------------------------
See
for details on the new format.
--------------------------------------------------------------------------------
The warning is spurious because I do have a :cljsbuild entry in my project.clj, and it's properly filled. Any ideas / familiarity with the issue?I suspect some transitive dependency was updated (which one cannot immediately see) causing the issue
should have googled it https://github.com/emezeske/lein-cljsbuild/issues/413
Has anyone used https://marmelab.com/react-admin/index.html with cljs?
I’ve never used it, but if you’re going to be using lots of 3rd party React components, you might consider using hx: https://github.com/Lokeh/hx/