This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-05
Channels
- # 100-days-of-code (1)
- # announcements (9)
- # aws (1)
- # beginners (195)
- # braveandtrue (60)
- # calva (3)
- # cider (36)
- # cljs-dev (3)
- # clojure (124)
- # clojure-canada (13)
- # clojure-dev (18)
- # clojure-germany (2)
- # clojure-italy (2)
- # clojure-losangeles (1)
- # clojure-nl (9)
- # clojure-russia (1)
- # clojure-spec (20)
- # clojure-uk (109)
- # clojurescript (49)
- # core-logic (29)
- # cursive (7)
- # datomic (62)
- # defnpodcast (1)
- # devcards (11)
- # docker (3)
- # duct (6)
- # figwheel (13)
- # figwheel-main (57)
- # fulcro (2)
- # graphql (11)
- # hyperfiddle (3)
- # jobs (5)
- # jobs-discuss (9)
- # leiningen (2)
- # lumo (1)
- # off-topic (12)
- # onyx (2)
- # pedestal (1)
- # portkey (2)
- # rdf (1)
- # re-frame (39)
- # reitit (13)
- # remote-jobs (2)
- # rum (5)
- # shadow-cljs (82)
- # tools-deps (48)
- # unrepl (3)
- # vim (12)
- # yada (1)
auto-testing doesnt work for me get 404 for http://localhost:9500/figwheel-extra-mains/auto-testing/ used figwheel-main template and upgrade deps.edn as:
:aliases {:fig {:extra-deps
{org.clojure/clojurescript {:mvn/version "1.10.339"}
com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}
com.bhauman/figwheel-main {:mvn/version "0.1.9-SNAPSHOT"}
com.bhauman/cljs-test-display {:mvn/version "0.1.1"}
actually maybe form template Im gettin this error
base.js:677 goog.require could not find: create_react_class
goog.logToConsole_ @ base.js:677
base.js:711 Uncaught Error: goog.require could not find: create_react_class
at Object.goog.require [as require_figwheel_backup_] (base.js:711)
at component.cljs:1
base.js:677 goog.require could not find: react
goog.logToConsole_ @ base.js:677
base.js:711 Uncaught Error: goog.require could not find: react
at Object.goog.require [as require_figwheel_backup_] (base.js:711)
at template.cljs:1
base.js:677 goog.require could not find: react_dom
goog.logToConsole_ @ base.js:677
base.js:711 Uncaught Error: goog.require could not find: react_dom
at Object.goog.require [as require_figwheel_backup_] (base.js:711)
at dom.cljs:1
base.js:677 goog.require could not find: react
goog.logToConsole_ @ base.js:677
base.js:711 Uncaught Error: goog.require could not find: react
at Object.goog.require [as require_figwheel_backup_] (base.js:711)
at core.cljs:1
app.cljs:10 Uncaught TypeError: Cannot read property 'call' of undefined
Arggh doc says url is /figwheel-extra-mains/ but in fact is /figwheel-extra-main/ so typo in docs or in code š
Still figwheel-main template and auto-testing doesnt work my dev.cljs.edn ^{:css-dirs [āresources/public/cssā]} {:main hola.app :auto-testing {:namespaces hola.mouse-test :cljs-test-display true} }
@gas, have you tried specifying a vector? :namespaces [my.ns]
Running into another dependency load order issue, this time with devcards
The issue is system.cljs:321 Uncaught ReferenceError: React is not defined
Again I'm using a webpack-built bundle, included as a foreign lib
Adding a console.log to my bundle, I see that it's loaded after devcards, so it's not surprising that devcards can't find window.React
Here's my ns declaration
(ns ^:figwheel-hooks playground.core
(:require [react]
[devcards.core :as dc]))
react
is a provide
of my foreign - so far so good
unfortunately that doesn't cause "react" (the provided ns) to be evaluated before devcards
adding this to my dev.cljs.edn makes it work:
:preloads [react]
but it seems a bit icky
also prints out WARNING: preload namespace react does not exist
but works anyway
@pesterhazy Iām sure this is because of the way that react is required by devcards
Right
Reagent includes React like this: https://github.com/reagent-project/reagent/blob/4c369531ce2a61cb133a242124617a159a39d9b4/src/reagent/dom.cljs#L2
which means IIUIC that if there's a bundle that provides react-dom
, it's guaranteed to be loaded before reagent.dom
yeah I think @juhoteperi did some work on that
looks like Om is still requiring cljsjs.react, rather than react
: https://github.com/omcljs/om/blob/775f3adebde911988674f1bf179fd8b920031c8e/src/main/om/dom.cljs#L4
As an experiment I tried requiring cljsjs.react
in my ns declaration, and that seems to work
It doesn't work with cljsjs.reactasdf
of course
So something must be providing cljsjs.react
, but I don't see anything in clojure -Stree
that would provide that ns
I wish I could grep in my classpath (including the jars)
Ok, made a script for doing that: https://gist.github.com/pesterhazy/74f6bc235dfe5f64690250d2ee84969d
Grepping in the code, I don't see see any location where cljsjs.react is provided (as opposed to required)
yeah, I have
devcards/devcards {:mvn/version "0.2.5", :exclusions [cljsjs/react-dom cljsjs/react cljsjs/create-react-class cljsjs/react-dom-server]},
looks like om gets included transitively via sablono
devcards/devcards 0.2.5
sablono/sablono 0.8.1
org.omcljs/om 1.0.0-alpha48
however, I don't see where om provides cljsjs.react
if I unpack that jar and grep for cljsjs, I only see references to require
or dependencies
same with sablono :thinking_face:
@bhauman lmk if you want me to test the devcards version based on global exports
@pesterhazy 0.2.6-SNAPSHOT
@pesterhazy sablono only uses om as a Clojure dependency
Thanks. I guess thatās not an allowed use!
@bhauman - Yeah I know template isnt up to new version however updated deps.edn with 1.9-SNAPSHOT and cljs-test and got base errors above on template app. Found was issue in deps,edn. I was running clj -Afig:build but template had :main-opts [ā-mā āfigwheel.mainā] in alias :fig and :build - commented out in fig and voila - learning alot - cheers š
yeah actually looking at my deps now I moved reagent out into global deps and left fig just with fig stuff, also template doesnt have watch_dirs in dev.cljs.edn and I added global paths of src and resource. Just FYI in case you forgot where template was as figwheel-main is moving at fast pace ..