React Vite env problem
I am trying react vite + drizzle. however, I don't know what's the issue here.
2 Replies
Why not use process.env here?
Take a look at https://discord.com/channels/1043890932593987624/1290460784912240721
I've gone through the similar debugging process there + given extra tip to consider in such setup
But from quickly looking at it -
import.meta.env
is available only when running through vite - which doesn't happen when running drizzle-kit
Use process.env
instead and don't forget to load env vars: