I actually need to get around to explore if that's possible, my biggest issue is I use an ultra wide monitor instead of a 4k one so I'm not sure if that would work 😅
Everything works beautifully, including the type coercion, however, VSCode is showing an error (red underline) on ProcessEnv: Property 'TEST' of type 'boolean' is not assignable to 'string' index type 'string | undefined'.ts(2411) I'll work on it. Thanks!
you probably need to make the validation schema cast it to a boolean, or you're not using the validated values from the zod validation but process.env.TEST directly?
Alem, I am getting an a typescript issue after following your guide and accessing my env directly: ```app/services/session.server.ts:9:15 - error TS2322: Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. 9 secrets: [process.env.SESSION_SECRET], ~~~~~~~~~~~~~~~~~~~~~~~~~~ Found 1 error in app/services/session.server.ts:9``` Specifically this crops up when I run `tsc - p cypress` (via a package.json script) Any idea how to fix this?
Alem, have you considered showing us how to integrate and deploy with cloudflare?
To be honest ,not in the near future, I have many videos I want to do first
Another banger, thanks! 💥
Thank you Rollo!
thanks man, love the remix content
Thank you for watching 🙏🏻
Hello and thanks! Good to see you again.
Thank you! Was sick for a long time! 🤒 Good to be back
Another great one Alem!
Would you consider doing future vids in 4K? Love your content 👍
I actually need to get around to explore if that's possible, my biggest issue is I use an ultra wide monitor instead of a 4k one so I'm not sure if that would work 😅
@@alemtuzlak Time to upgrade 😉
Great job!
Thank you 😊
Everything works beautifully, including the type coercion, however, VSCode is showing an error (red underline) on ProcessEnv:
Property 'TEST' of type 'boolean' is not assignable to 'string' index type 'string | undefined'.ts(2411)
I'll work on it. Thanks!
you probably need to make the validation schema cast it to a boolean, or you're not using the validated values from the zod validation but process.env.TEST directly?
Alem your content is very useful. One request can you please enlarge the text while recording the video.
Thank you so much, I'll make it even larger in the future!
Alem, I am getting an a typescript issue after following your guide and accessing my env directly:
```app/services/session.server.ts:9:15 - error TS2322: Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.
9 secrets: [process.env.SESSION_SECRET],
~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 1 error in app/services/session.server.ts:9```
Specifically this crops up when I run `tsc - p cypress` (via a package.json script)
Any idea how to fix this?
Have you tried using my getServerEnv helper? The reason you get this is because it's not validated by zod so it is indeed either a string or undefined
@@alemtuzlak I noticed that cypres declares its own global namespace, so I redefined the env there (by exporting the APP_ENV type) and it was happy
@@shmulimargulies5462 awesome!