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