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
Neto15mo ago
you are acessing a server environment variable on client side go to src/env.mjs
Neto
Neto15mo ago
you will see this part of the file
Neto
Neto15mo 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
Neto15mo ago
Create T3 App
Environment Variables 🚀 Create T3 App
The best way to start a full-stack, typesafe Next.js app.
GXLDEN
GXLDEN15mo 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
Neto15mo ago
@GXLDEN are you using the db file on client?
GXLDEN
GXLDEN15mo 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
GXLDEN15mo ago
fuck i just saw the issue i think it's due to this :
GXLDEN
GXLDEN15mo ago
i thought that i could use the noteSchema to use it for validation on the client it just works now thanks dude