ahylianhuman
DTDrizzle Team
•Created by ahylianhuman on 7/27/2024 in #help
drizzle-kit should use `peerDependencies` instead of bundling dependencies
In addition to the
.env
loading issue for local development, I see that drizzle-kit
has bundled a bunch of drivers into its own executable instead of using peerDependencies
. This makes it impossible to override neonConfig
settings so I can use a local wsproxy
for local development since drizzle-kit
is using an entirely separate and unexported copy of @vercel/postgres
and @neondatabase/serverless
.
There should either be a way to configure settings on the bundled copy @neondatabase/serverless
or a way to use peerDependencies
to dedupe drivers so that we can override settings on the same instance that drizzle-kit
uses.1 replies
DTDrizzle Team
•Created by ahylianhuman on 7/27/2024 in #help
drizzle-kit overriding `process.env` before `@next/env` can load values
I'm trying to use
drizzle-kit push
using the setup recommended by the Drizzle and Vercel docs, but I am finding that the drizzle-kit
command is performing its own dotenv
loading before my config file can import and use loadEnvConfig
from @next/env
. This is causing issues if I have an empty value for POSTGRES_URL
in .env
(for documentation purposes) and the actual value in .env.local
(for local development) because drizzle-kit
is unaware of how @next/env
loads environment variables.
I've worked around this issue by setting by setting DOTENV_CONFIG_PATH=/dev/null
, but there should a way to turn this automatic behavior off (or more ideally, make it opt-in instead of opt-out) so it is easier to load environment variables correctly using @next/env
or another .env
loader of choice.1 replies