MAF Evan
MAF Evan
TTCTheo's Typesafe Cult
Created by younes on 2/4/2025 in #questions
t3/env strange behavior on validation
You could try adding “use server” to the top of http-client.ts? Doesn’t look to me like you’re actually leaking anything, might be that t3 env is rather aggressively telling you that you could accidentally do so?
6 replies
TTCTheo's Typesafe Cult
Created by younes on 2/4/2025 in #questions
t3/env strange behavior on validation
A bit hard to say without seeing your code, but go ahead and move the server action to a file that only contains server code and see if that fixes it. You need to be particularly careful with closures when you use server actions. Separating server code prevents most gotchas. Theo has a good video that goes over the issue: https://youtu.be/9WvJDor5uvo?si=XXvJdH4ZbV5NV3Eh
6 replies