adding provider causes type error

when adding a new provider, I get the following error despite having changing the ENV and adding the new environment variables. Type 'string | undefined' is not assignable to type 'string'.
17 Replies
'tonyyprints'
'tonyyprints'OP2y ago
'tonyyprints'
'tonyyprints'OP2y ago
I removed process, now I get this error
Samathingamajig
when you see an error that's happening to part, but not all, check the diff
Samathingamajig
then you need to add it to the schema scroll up to the top where env is imported and go to that file it should either be schema.ts or server.ts
'tonyyprints'
'tonyyprints'OP2y ago
'tonyyprints'
'tonyyprints'OP2y ago
is it not this stuff?
Samathingamajig
no
'tonyyprints'
'tonyyprints'OP2y ago
ahhh ok I found the file
Samathingamajig
so the point of the schema is that we have typesafe env using zod
'tonyyprints'
'tonyyprints'OP2y ago
Samathingamajig
this ensures, at build time, that all the environment variables that need to be there are there and that they are the right type yes, add that, and below
'tonyyprints'
'tonyyprints'OP2y ago
makes sense yea
'tonyyprints'
'tonyyprints'OP2y ago
'tonyyprints'
'tonyyprints'OP2y ago
got it thank you
Samathingamajig
👍
'tonyyprints'
'tonyyprints'OP2y ago
now I gotta figure out what this entire file is doing lmao thanks for the help❣️
Want results from more Discord servers?
Add your server