Sam
Sam
DTDrizzle Team
Created by Sam on 6/8/2024 in #help
Drizzle config file unable to locate env file
I'm trying to create a SvelteKit app, with Drizzle and PostgreSQL using this tutorial: https://sveltekit.io/blog/drizzle-sveltekit-integration and the SvelteKit documentation for env import modules https://kit.svelte.dev/docs/modules#$env-static-private I've created a drizzle.config.ts file in my root containing the code he gives, and a .env file in my root containing some variables. I'm getting the error Cannot find module '$env/static/private' or its corresponding type declarations. ts(2307) when I try and import the env file with import { env } from '$env/static/private'; and Type '"pg"' is not assignable to type '"d1-http"'.ts(2322) on the drizzle driver declaration line. It seems that typescript is unable to find the local file perhaps? Any idea what might be causing these errors?
1 replies