This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-16
Channels
- # announcements (5)
- # aws (34)
- # beginners (145)
- # cider (48)
- # circleci (8)
- # clara (7)
- # clj-kondo (28)
- # cljs-dev (75)
- # cljsrn (4)
- # clojure (325)
- # clojure-czech (10)
- # clojure-europe (5)
- # clojure-italy (4)
- # clojure-nl (4)
- # clojure-spec (6)
- # clojure-sweden (3)
- # clojure-uk (70)
- # clojurescript (18)
- # clr (1)
- # community-development (2)
- # cursive (38)
- # data-science (7)
- # datascript (14)
- # datomic (22)
- # emacs (2)
- # figwheel (1)
- # fulcro (6)
- # graalvm (22)
- # graphql (11)
- # hoplon (12)
- # jackdaw (8)
- # jobs-discuss (16)
- # juxt (5)
- # leiningen (19)
- # luminus (5)
- # nrepl (2)
- # nyc (1)
- # off-topic (6)
- # overtone (2)
- # pedestal (10)
- # re-frame (6)
- # reagent (8)
- # reitit (1)
- # rewrite-clj (43)
- # ring (2)
- # shadow-cljs (124)
- # testing (1)
- # vim (22)
- # xtdb (77)
- # yada (4)
Anyone have any issues deploying to heroku?
I have a test project here: https://github.com/andreortiz82/middlemancljs
It continues to crash due this error Executable 'java' not found on system path.
.
Iβve added the heroku/[ruby nodejs java]
buildpacks but Iβm still missing the proper incantations. Anyone else run into this? Any resources or tips would be much appreciated. Thank you! π
I really love Shadow-CLJS, but find I'm still having an issue getting the CLJS repl to function the way that I want for the :react-native target β¦
At the moment when I run rlwrap shadow-cljs cljs-repl app
to connect to my app (running under react-native android
alongside the Metro bundler I get a mysterious websocket error message. I feel like this wasn't always happening but remain unsure on the cause.
@attentive shadow-cljs can pick the wrong IP so the REPL client may fail to connect to the actual shadow-cljs instance.
Yes β¦ I've got a more minimal instance of an issue now that's still perplexing me
you can configure the IP to use via shadow-cljs watch app --config-merge '{:local-ip "123.123.123.123"}'
or :local-ip ...
directly in the build config
Okay I seem to have two separate, and unrelated issues. The issue with guessing the IP might be affecting my main project, but on this minimal version of your Expo example with Expo removed, I get "no source by provide: "
exception info once the REPL appears to have connected.
yarn run v1.12.3
$ rlwrap shadow-cljs cljs-repl app
shadow-cljs - config: /home/tom/dev/trm/rn-rf-shadow/shadow-cljs.edn cli version: 2.8.8 node: v8.15.0
shadow-cljs - connected to server
[4:1]~scout.dev-preloads=> (foo)
[:result {:type :repl/error, :ex #error {
:cause "no source by provide: scout.dev-preloads"
:data {:provide scout.dev-preloads}
:via
[{:type clojure.lang.ExceptionInfo
:message "no source by provide: scout.dev-preloads"
:data {:provide scout.dev-preloads}
:at [shadow.build.data$get_source_id_by_provide invokeStatic "data.clj" 182]}]
:trace
[[shadow.build.data$get_source_id_by_provide invokeStatic "data.clj" 182]
[shadow.build.data$get_source_id_by_provide invoke "data.clj" 179]
[shadow.build.data$get_source_by_provide invokeStatic "data.clj" 185]
[shadow.build.data$get_source_by_provide invoke "data.clj" 184]
[shadow.cljs.repl$process_read_result$fn__12538$fn__12539 invoke "repl.clj" 431]
[shadow.cljs.repl$process_read_result$fn__12538 invoke "repl.clj" 407]
[shadow.cljs.repl$process_read_result invokeStatic "repl.clj" 405]
[shadow.cljs.repl$process_read_result invoke "repl.clj" 381]
[shadow.cljs.devtools.server.worker.impl$fn__13210 invokeStatic "impl.clj" 784]
[shadow.cljs.devtools.server.worker.impl$fn__13210 invoke "impl.clj" 745]
[clojure.lang.MultiFn invoke "MultiFn.java" 234]
[shadow.cljs.devtools.server.util$server_thread$fn__12888$fn__12889$fn__12897 invoke "util.clj" 292]
[shadow.cljs.devtools.server.util$server_thread$fn__12888$fn__12889 invoke "util.clj" 291]
[shadow.cljs.devtools.server.util$server_thread$fn__12888 invoke "util.clj" 264]
[clojure.lang.AFn run "AFn.java" 22]
[java.lang.Thread run "Thread.java" 748]]}}]
[4:1]~scout.dev-preloads=>
ok I'm assuming you have set :repl-init-ns scout.dev-preloads
whithout repeating said ns into the :preloads
?
For what it's worth, the repo I'm working with is here https://github.com/Trailmarker/rn-rf-shadow, it's a modified version of the Expo / re-frame example that was created by @pez β¦
@attentive try [email protected]
. that should fix the :preloads
related REPL issue
Okay, getting some joy here, thanks! I've now got scout.dev-preloads
in both :repl-init-ns
and :preloads
, and after restoring it to the :preloads
vector I can execute (foo 1 2)
correctly from that namespace after the REPL connects. This looks very promising.
I'll take a look back at it, just jumping back on now to see if I can get this all working with my private repo
@thheller I'm experimenting with haul and react-native for sourcemaps, which uses webpack, I'm looking into the source-map-loader, and it seems it calls fs.readFile according to a regex of the source map url at the bottom. The problem seems to me, I could be wrong, that the source map url doesn't include the file path, to the directory, only the name of the sourcemap file without path to it. Could I add that to the js output from shadow side?
I work in a corporate environment where they have recently blocked all access to external repo managers like maven, npm, etc. and have instead set up an internal Nexus repo that we are to use. I can add a .npmrc file in my project to set the repo for npm to use, but I could not figure out how to set the repository that shadow itself uses to pull down its dependencies. Any suggestions?
@jeff.dierckman use tools.deps for dependency resolution and add the repository from there?
@hlolli thanks. I'll give that a shot.
@hlolli I'm not sure what you are asking? the source map doesn't require any other external files
@jeff.dierckman you can control maven related settings via :maven {:repositories {...}}
in shadow-cljs.edn
like this here //# sourceMappingURL=app.components.button.js.map
I'd want it to be //# sourceMappingURL=build/app.components.button.js.map
or smth, maybe it doesn't make sense?
yes, I'm wondering if webpack is noticing that, build/ would be the path from the root directory of the project
the resolve rules for sourceMappingURL
are quite simple to webpack should find it properly
it's this loader here https://github.com/webpack-contrib/source-map-loader/blob/master/index.js it also looks for sourceRoot
but it's bit unstable, had to use next directly from their github to make it work, so soon it will get more stable
they transform the js and then concatinate into a huge file, and trying to keep sync of the source maps is hell
no, they work fine, they just source map the js output, but it's fully debuggable, so I'm just tryign to get source mapping to the cljs sources
right now, with Haul, it's source mapping the js output, ignoring the .map files from shadow
I think not, I think it resolves without source maps, but I'll investigate further so I'm sure about it, all I can say that this res callback from info https://github.com/webpack-contrib/source-map-loader/blob/master/index.js#L97 is never called, but regex match 2 finds the the sourcemapurl, so something in between is failing
I don't think they support it, if they use metro at all, then it's the last step. They claim that symlink between files work, maybe eliding the need for a single bundle? Not sure.
I don't really have time to dive into this now but if you figure out how to tell the native app which JS to load we can do all of this without metro properly
I only tried emulating what expo did there and that already proved not worth it in the end
I already ruled out expo long ago, makes no sense to be ejected, nothing that expo gives me that pure metro/shadow can't give me.
expo was only relevant since it allowed a way to "hack" which .js
file was loaded by the runtime
my apologies for crossposting but I'm not sure if I'm having a cider issue or a shadow-cljs issue:
when trying to run and connect to a shadow-cljs app I'm getting a ton of nrepl middleware warnings and then get errors when trying to connect to the repl (using cider/cider-nrepl and cider/piggieback with vim fireplace). https://pastebin.com/se1cJESJ This was working a few weeks ago but I'm on a fresh install so don't know what has changed. any clues?
this is the error message I get when trying to connect: https://pastebin.com/ZueFshz0
relevant portion of shadow-cljs.edn
:
:dependencies [[binaryage/devtools "0.9.10"]
[cider/cider-nrepl "0.21.1"]
[cider/piggieback "0.4.1"]
[reagent "0.8.0"]]
interesting. I've always had to do :Piggieback :app
to get my vim-fireplace repl connection switched to cljs
shadow-cljs - config: /home/chaselambert/projects/learn-reagent-course-files/giggin/shadow-cljs.edn cli version: 2.3.30 node: v12.2.0
global never matters since the version in the project is always used. so in the project π
and we are back up and running! thank you so much! I'll let the tutorial author know about that old shadow-cljs dependency
Hey π I'm getting The required namespace "cljsjs.prop-types" is not available
, I think last times this has been fixed by just installing the appropriate npm package but the error sticks around
I checked that shadow-cljsjs handles prop-types which it seems to do
oh but wait, just seeing that that change is only 8 days old
updating and I guess that will be it π