MaveriX89
Explore posts from serversException thrown when invoking useNavigate within Router root layout
Just adding more additional context here. The
NavbarLink
components are just <A>
elements from @solidjs/router
wrapped under <li>
tags.
And for reference, here is my Login.tsx
:
I make heavy use of the getAuthState
query which you can see here:
From the looks of it, I do see the url change in my app showing that it went to /login
-- however, everytime it does, the <ErrorBoundary>
fallback component kicks in and displays instead of the Login page I defined above due to that thrown exception.2 replies
Getting UnhandledPromiseRejection in Solid Start server function that stops dev server
Thanks for all your help and input in this thread. You've been incredibly invaluable.
Yeah, I figured that I would lose single flight mutations in this road. That's a bullet I'm gonna have to bite. I've been fighting Solid Start way too much over these past few days over authenticated routes and how to properly manage them.
Just my two cents, I feel that the documentation needs to be improved in perhaps adding examples around this use-case of properly handling protected routes within Solid Start.
33 replies
Getting UnhandledPromiseRejection in Solid Start server function that stops dev server
Yeah, it's an interesting problem...it's unfortunately blocking me from using Solid Start because of it. I may just pivot to doing a vanilla Solid SPA with an Elysia backend server if I'm not able to resolve the issue
33 replies
Getting UnhandledPromiseRejection in Solid Start server function that stops dev server
I'm all new to this myself in using Solid Start for the first time -- apologies if I'm not explaining things correctly. Basically, when I comment out that line where I return the
Error
object in my log in server function, the dev server doesn't croak and die. When I keep it and see it run, I actually see the error message appear on my UI that the Error
returned, but the dev server dies once it appears. I took that as an indication that something perhaps went wrong on the server side and not client side 🤔33 replies
Getting UnhandledPromiseRejection in Solid Start server function that stops dev server
Judging from the other post, could the problem be in me using
getUser
in some premature way? Below is my app's root layout
Does anything look unexpected here?33 replies
Getting UnhandledPromiseRejection in Solid Start server function that stops dev server
Ah, that's funny -- I think that issue is the same exact problem I'm facing. In my case, the success path works fine without a problem. Haven't noticed any issues when logging in successfully. It only is the path where I return a
new Error()
in the code path for logging in on the server.33 replies
Getting UnhandledPromiseRejection in Solid Start server function that stops dev server
Just not sure why when I invoke the error path (e.g. submitting without username and password) while in dev mode with my dev server running, the failure path on the server side chokes with the unhandled exception and shuts down my dev server which is not a graceful way to handle that. Seems like the wrong behavior to me. Not sure if it's something that I'm doing wrong from a workflow perspective / component design.
33 replies
Getting UnhandledPromiseRejection in Solid Start server function that stops dev server
Gotcha -- so here's the breakdown with two files/modules. This was all generated from the Create Solid CLI starter (with Drizzle option checked):
First one here is
./src/api/index.ts
and the second is ./src/api/server.ts
I believe the above aligns with what you described33 replies
DTDrizzle Team
•Created by MaveriX89 on 1/8/2025 in #help
drizzle-kit push not working with pgSchema
Funny enough, it came up after me going back and forth with ChatGPT haha
8 replies
DTDrizzle Team
•Created by MaveriX89 on 1/8/2025 in #help
drizzle-kit push not working with pgSchema
@Optio1 I managed to find a workaround to this problem -- or maybe this is actually what is expected that we are supposed to do if we intend to make use of
pgSchema
in our codebases. I had to update my drizzle.config.ts
to the following:
The key field is schemaFilter
. Apparently, Drizzle Kit needs to be told what schemas it can manage in the given database. So for eveny pgSchema
created, its name has to be added to that list. The default behavior is it only works on the public
schema which is why drizzle-kit push
was basically a no-op when I was doing it before.8 replies
DTDrizzle Team
•Created by MaveriX89 on 1/8/2025 in #help
drizzle-kit push not working with pgSchema
@Optio1 that's interesting! Thanks for looking into that. It's sad that using Postgres schemas/folders doesn't work as expected especially if we're trying to organize our tables properly.
8 replies
Containerized Solid Start Deployments
Ah, I made some progres and managed to successfully create a Docker image using the following:
Guess we're not really using
bun
as the underlying runtime because the Vinxi server uses Node if I'm not mistaken (but I'm using bun
to run scripts and manage my dependencies). So I use the imbios/bun-node:1.1.42-22-slim
base image (alpine
did not work).2 replies