"use server" working locally but not when deployed
why does this code not work when deployed but works locally in dev?
removing "use server" makes it work but for some reason when its there my output is just "Signed in as"
logs also do not show that getAuth is running
register.tsx
~/lib/server/auth
---
deployed on cloudflare
7 Replies
O,
ssr: true
seems to fix it... so i need ssr
to run 'server actions'?yeah, ssr: false doesn't ship any server code
No, you don't. Please see: https://discord.com/channels/722131463138705510/910635844119982080/1277738480633643119
oh my bad, sorry!
O okay, do you know why my code wasn't working when ssr is false?
because my tanstack form don't work when ssr is true 😂
ok now it works with ssr false??? so weird, i don't even know what changed 🤔
caching? refreshing? the time of the day? Maybe it's already August 27th where you are?
not sure, but I've noticed more than the average random issues while dealing with solid-start
also, please notice tanstack-forms is super new, they ought to have some issues of their own
well it was broken on the 26th and fixed on the 27th 😂 ... My middleware seemed to have caused some issues, maybe that was caching when i was debugging
When SSR was false then this line would break things in the middleware
I think it would cause an infinite redirect loop which wouldn't happen when SSR is on
adding
&& !pathname.startsWith('/_server')
fixed this issue
but i am sure i removed the middleware before and still had issues 🤷♂️ working now, hopefully i don't get any other issues like this because I really don't want to switch back to nextjs :L