-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blank page due to conflicting shadow-cljs >= 2.19.9 and wrap-resource (ring) call #17
Comments
Any chance you could do a pr for the fix? :) |
It feels like it is probably related to the version upgrade of shadow-undertow. Related commits: Eventually I temporarily solved the problem by adding |
Thanks for the explanation of the problem. I'll open an issue for it on shadow-cljs repo. |
here's the issue to track thheller/shadow-cljs#1058 |
This is a problem with the generated code.
Previously I guess this was relying on broken behavior, where the presence of an My suggested fix here would be to remove this handler entirely. This custom handler does nothing that the built-in Change the generated
and remove the ring/handler references from the generated Instead then just generate this in
This will serve all static files from the
This will first look in the local If you must have the custom handler then you must also adjust all the other path accordingly, so that the My strong recommendation is to remove this handler though. If a custom handler is actually required, a full custom ring server should be used instead. Edit: Besides the above mentioned problems what is |
Thanks for following up on this. Removing the handler references also fixed it for me, but I wasn’t sure what exactly it does for the template to attempt a pr, having almost no experience with server stuff whatsoever. |
@thheller thanks for the explanation. Removing custom handler is working as intended on my end as well. And don't actually recall what the point of wrapping |
For some reason, the template
lein new reagent-frontend <name> +shadow-cljs
breaks for me if theshadow-cljs
dependency inpackage.json
is above version 2.19.8.npx shadow-cljs watch app
will only render the page when I remove:handler user/app
from theshadow-cljs.edn
file. I was looking through the changes in https://github.com/thheller/shadow-cljs/blob/6d72ac7e09a1e153fa05498f19fa8dee34bd2474/CHANGELOG.md but I can’t isolate what may be causing this (maybe a dependency bump).Of course, this relates to the form
(def app (wrap-resource identity "public"))
insrc/user.clj
. Replacing the call towrap-resource
with the shadow-cljs defaultshadow.http.push-state/handle
fixes it, so I am quite sure that it has something to do with thering-core
dependency (1.9.5 in my case) that may conflict somehow with shadow-cljs (>= 2.19.9).But even after reinstalling ring and shadow-cljs in my local Maven repo it will just render an empty page, with an empty
<head>
and<body>
tag, no error messages in the terminal or browser console.It happens with Reagent 1.1.0 as well as 1.1.1.
The text was updated successfully, but these errors were encountered: