This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-25
Channels
- # beginners (152)
- # boot (4)
- # bristol-clojurians (1)
- # cider (1)
- # cljs-dev (176)
- # clojure (104)
- # clojure-china (2)
- # clojure-uk (6)
- # clojurescript (6)
- # core-async (23)
- # cursive (4)
- # datomic (3)
- # devops (1)
- # duct (32)
- # events (1)
- # fulcro (9)
- # hoplon (2)
- # jobs-discuss (9)
- # lein-figwheel (2)
- # leiningen (3)
- # off-topic (19)
- # pedestal (2)
- # portkey (14)
- # re-frame (20)
- # reagent (41)
- # rum (4)
- # shadow-cljs (26)
- # tools-deps (1)
- # unrepl (5)
Hi, I’m trying to play around with a js lib in the REPL. based on my reading, the import below should be something like this? (require '["auth0-js" :default auth0])
. auth0
is nil after the require
import auth0 from 'auth0-js';
export default class Auth {
auth0 = new auth0.WebAuth({
@eoliphant unfortunately it depends on the packaging on npm. most likely that was converted by babel and might work differently
ok checking it out. also, i’d typed an earlier comment but realized it was at least partly in error. But still seeing some weirdness. When I do a (require..) in the repl, it doesn’t seem to ever return the ‘nil’. at first i thought it wasn’t working at all, but I could say call str/blank?
after require’ing clojure.string, etc. It threw me a little with this because I wasn’t sure the require itself was working
I'm seriously struggling to find a better message than There is no connected JS runtime.
. Please help!
means that the compiled JS output was not loaded or has not connected back to the REPL server
(shadow.cljs.devtools.api/nrepl-select :browser)
=> [:no-client :browser "Please load your JS to connect to the REPL."]
is there a way to use lein’s repl but shadow-cljs’s cljs compliation? is that even possible when we start talking about connecting to browser sessions? the reason I ask is that the lein repl is just much more robust and developed, but shadow-cljs has much nicer cljs compilation and node module support
“No application has connected to the nREPL server. Make sure your JS environment has loaded your compiled ClojureScript code.” @thheller how about something like that?
hi ,
my laptop chrashed and on reboot, when i run ....
shadow-cljs watch app
results in
shadow-cljs - config: /Users.......vc/shadow-cljs.edn version: 2.1.6
shadow-cljs - socket connect failed, server process dead?
@fj.abanses delete .shadow-cljs/*.port
. 2.2.18
which I released today handles such crashed more gracefully.
@lwhorton if you want to embed in lein
and want to use a remote nREPL you need to configure the shadow-cljs middleware. https://shadow-cljs.github.io/docs/UsersGuide.html#_embedded_nrepl_server
so is it possible then to have shadow-cljs “controlled” by lein, where say “lein repl -> (fig-start)” actually starts an nREPL but defers to shadow-cljs for the compilation and properly intercepts the repl?
take a look at the docs and shadow.cljs.devtools.api
. calling (shadow.clsj.devtools.api/compile :foo)
is identical to shadow-cljs compile foo
. same for watch
and release
.
besides that you can just use the clojure api to use shadow-cljs. https://shadow-cljs.github.io/docs/UsersGuide.html#embedded
@lee.justin.m sounds good. I'll add that later.