43 Replies
this only happens when going to
/other
from a new tab. when going to /other
from the link in /
it works fine.
it means the browser router is working, but the server router isn'tmove
out of the component?
will
did not work
how does your code look now?
moved it to
App
and outside of App
too
both didn't work
and
same errorthis one I expected to work.
the error is purely ssr btw
it never happens on the client
and only on the
/other
page
i tried wrapping App with Suspense
didn't work eitherI just ran your code from a fresh
pnpm create solid@latest
and with this sample and I do not get an error.
I had to change export App
to export default App
are u doing ssr?
think so lemme check
i think it defaults to ssr right
do our versions match?
but does pnpm create solid offer vanilla solid ssr? i think it only offers csr solid or solidstart
i'm using vanilla solid ssr
wait
ooo
i see
ur not using solid-start
yep
otherwise my App would look different
kind of important to add that information
how so?
App would use FileRoutes or something like that in solidstart
no
FileRoutes
is optional
as i said, i literally copied your code and it works
you can have config based routinginteresting
or even mix and match
i would recommend using solid-start if you want ssr
it has its own set of bugs since it is still early 1.0, but it is where all the focus/support on ssr is these days.
isn't solidstart v1 already?
yes exactly
early 1.0
ah
the api will not have drastic changes
understandable. its still a bug worth reporting tho.
i will create a repo
true, or at least if vanilla ssr does not support the
@solidjs/router
it should be communicated clearly.Ok, so ur using bun too.
It would be good to mention this information from the start
If SSR deviates from solid-start, if ur using bun/deno or another runtime that is not node.
hm i don't think so
but idk
just tried in node, it doesn't work either
all i changed is Bun.file to readFileSync to work with node :D
https://github.com/solidjs/solid-router/blob/main/src/data/cache.ts#L34
this is where the error happens
its because i'm not using provideRequestEvent i think
yeah probably that
I can reproduce the error on my end, but tbh it's a bit too far from what I have knowledge in to help u with
But ye, the error has probably something to do with that custom SSR setup
I know bun when using solid-start actually uses node under the hood because it is missing some APIs
custom ssr is hard but not impossible
bun has some problem with FormData in solidstart
but everything else works fine
with --bun
(if you run
bun --bun dev
bun uses bun runtime, not node)https://github.com/DaniGuardiola/bun-plugin-solid this might be relevant to u
GitHub
GitHub - DaniGuardiola/bun-plugin-solid: A plugin to compile Solid....
A plugin to compile Solid.js with Bun. Contribute to DaniGuardiola/bun-plugin-solid development by creating an account on GitHub.
oh
this is for bundling i think
i use vite
I might give it a shot one day 😁
i don't care about bun bundler
bun doesn't support solidjs style of jsx
that's the only blocker
only react/preact works
Ye no transforms right, only to h-calls
but if you use bun with vite, solid is just gonna be processed with esbuild and rollup, so bun doesn't care anymore :D
Lol all this stuff is very much out of my comfort zone. Gets so confusing haha
Abstractions on top of abstractions. Turtles all the way down!
i fixed it
Nice! What was it in the end?
.
provideRequestEvent