Strange Runtime Error

Hey guys, it's the first time for me using the T3 stack i'm trying to create a note-crud just to test with the stack but this error has left me stuck on it for a while. ps : sorry for my english and I'm a french speaker from Belgium
9 Replies
Neto
Neto2y ago
you are acessing a server environment variable on client side go to src/env.mjs
Neto
Neto2y ago
you will see this part of the file
Neto
Neto2y ago
if for any reason you access some variable from server object, the error bill be thrown you can see both of them merged on the env.NODE_ENV because its easier to export
Neto
Neto2y ago
Create T3 App
Environment Variables 🚀 Create T3 App
The best way to start a full-stack, typesafe Next.js app.
GXLDEN
GXLDENOP2y ago
I don't recall using a server environment variable in the client I'll probably check this tomorrow cuz it's 3am in Belgium rn i've just checked and beside using the db var for setting the database i don't see where i used a server environement variable @Neto
Neto
Neto2y ago
@GXLDEN are you using the db file on client?
GXLDEN
GXLDENOP2y ago
@Neto do you mean /server/db cuz it's used only on the trpc.ts file i guess it was my fault i just saw the error i think
GXLDEN
GXLDENOP2y ago
fuck i just saw the issue i think it's due to this :
GXLDEN
GXLDENOP2y ago
i thought that i could use the noteSchema to use it for validation on the client it just works now thanks dude
Want results from more Discord servers?
Add your server