This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-28
Channels
- # announcements (34)
- # babashka (46)
- # beginners (187)
- # biff (2)
- # calva (5)
- # cider (10)
- # clj-http (2)
- # clj-kondo (14)
- # cljs-dev (31)
- # clojars (3)
- # clojure (43)
- # clojure-europe (25)
- # clojure-nl (1)
- # clojure-uk (3)
- # clojurescript (4)
- # clr (1)
- # cursive (1)
- # datalevin (50)
- # datomic (1)
- # emacs (12)
- # etaoin (6)
- # fulcro (7)
- # helix (21)
- # hyperfiddle (20)
- # kaocha (5)
- # lsp (14)
- # malli (10)
- # off-topic (58)
- # polylith (7)
- # portal (5)
- # reagent (39)
- # reitit (10)
- # releases (11)
- # reveal (14)
- # scittle (7)
- # shadow-cljs (58)
- # sql (8)
- # tools-deps (7)
Can someone check if my imports are configured correctly? I get an error that useStripe is null
(ns invoice.frontend.main
(:require [lambdaisland.fetch :as fetch]
[promesa.core :as p]
[reagent.core :as r]
[reagent.dom :as rd]
["@stripe/react-stripe-js" :refer (Elements CardElement useStripe useElements)]
;; something seems wrong here ^^
["@stripe/stripe-js" :refer (loadStripe)]))
Strange. After running npm install stripe/react-stripe-js my dependencies are borked, returning compilation error
../node_modules/@stripe/react-stripe-js specified entries but they were all missing
I think I may have damaged something by manually purging my npm user temp directory a few days ago. I'll delete node modules and try to reinstall everything againAlso wondering why I have the deref symbol at stripe, seems like a mistake
Still having this problem, but I've audited the directory and the files exist.
deleting the ["@stripe/react-stripe-js" requirement, compiling, re-adding it, compiling hangs. Then breaks again.
It's hard for me to tell what went wrong. I fixed my build issues by deleting my global npm directory, reinstalling the latest npm, moving my src and .edn config file into a new directory, re-initializing npm, re-installing shadow-cljs, and re-installing all npm packages. However my invoice-frontend.js now returns
malformed hexadecimal character escape sequence
under goog.debug. Compiling fixed this, but once again back to the same issue of stripe being null. Will see if it's a browser cache issuethe @
in this case does not mean deref. it is just a way npm packages are grouped under an "organization". so @stripe
is the organization and react-stripe-js
is the package in that org
you can always try to ["@stripe/react-stripe-js" :as x :refer (Elements CardElement useStripe useElements)]
and (js/console.log "x" x)
or (js/console.dir x)
seems like useStripe
should exist, but you seem to be getting a bunch of weird errors. so might be your disk or something
Morning! What is the best way to fix
--- node_modules/react-virtualized-auto-sizer/dist/react-virtualized-auto-sizer.js:218
Transpilation of 'Member references this or super' is not yet implemented.
What is the best way to determine how up does one need to go? Just by binary search? 🙂
Oh, that should be related classes so es6…?
I was not setting it
I was assuming your answer meant to set it higher
I guess the default is too low then. the default is :es2020
which I assumed would be good enough
I just updated shadow-cljs and recalculated the dependencies with yarn and this came up 🙂
=== Version
jar: 2.22.8
cli: 2.22.8
deps: 1.3.4
config-version: 2.22.8
I used to have 2.11.x
or did it work before because you were using an older react-virtualized-auto-sizer
version?
Yes, I think recalculating the dependencies brought up some incompatible version.
can't say for sure, the error you are getting is from the closure-compiler, not shadow-cljs
Yeah, this is my problem, not yours 😄
I was just interested in hearing if someone had hit this but I’ll investigate the package deps then and see where it broke. Thanks so much for your fast replies!
Yeah, downgrading it from 1.0.9 to 1.0.6 fixed that error. Nice.
It’s not always inconsequental to do even patch version level updates 😄
Hi, I'm currently trying to use two different node_modules, three and @okta/okta-auth-js. I'm using js-options to specify an order to use the module key (package.json) to load three.module.js first. Unfortunately, to load okta I need to specifiy a different key but module is also used. I really need to avoid the module key for okta. Is there a way to specify this order on a package basis?
why do you need to avoid it for okta? the answer is no, this is a global setting and not per package
you could just require the file you need directly of course, in which case shadow-cljs won't event look for the :entries
I don't know exactly why but when I specify module first, the build makes a reference to a promise (through generator-runtime) which prevents Okta from checking that the full authentication process went right
I do not understand that description. I'd assume that both variants do some kind of async?
Here is the actual error,
Uncaught (in promise) AuthSdkError: Could not load PKCE codeVerifier from storage. This may indicate the auth flow has already completed or multiple auth flows are executing concurrently.
at exports.parseFromUrl (parseFromUrl.js:132:13)
at PromiseQueue.run (PromiseQueue.js:63:32)
at eval (PromiseQueue.js:48:12)
at new Promise (<anonymous>)
at PromiseQueue.push (PromiseQueue.js:34:12)
at eval (events.cljs:45:25)
at re_frame$fx$do_fx_after (fx.cljc:59:23)
at Object.re_frame$interceptor$invoke_interceptor_fn [as invoke_interceptor_fn] (interceptor.cljc:70:6)
at Object.re_frame$interceptor$invoke_interceptors [as invoke_interceptors] (interceptor.cljc:108:24)
at Object.re_frame$interceptor$execute [as execute] (interceptor.cljc:201:8)
Not both actually, only Okta.
But I'm not sure how Okta interacts with babel in details
hmm not sure. this is an internal error from the library itself. doesn't seem build related.
anyways you can change your require from "@okta/okta-auth-js"
to "@okta/okta-auth-js/umd/default.js"
to get the "browser"
directly. essentially this bypasses the :entries
config
or :js-options {:resolve {"@okta/okta-auth-js" {:target :npm :require ""@okta/okta-auth-js/umd/default.js"}}}
in the build config also works
This is exactly what I did. I'll just avoid using a generic directive when dependencies grow
Thanks 🙂