invalid env vars with drizzle and neondb
So Im using nextjs + drizzle + neon db
Ive setup a script to print my databse
i get this error:
`
here is my env.js:
https://gist.github.com/navincodesalot/e91d0cd5ffca574fe1a593ac48ae5311
Here is my server/index.ts:
https://gist.github.com/navincodesalot/bfda54ac39a0c5cdf88867fa3ad22eb5
Is there a reason I can't use process.env in my index.ts?
am I using it correctly
5 Replies
do i not use process.env anywhere?
Have you set your env variables?
yes in my .env
Every call to process.env fails and needs the path to be specified so the only way it works if it this is added at the beginning of the program:
import {config} from 'dotenv';
config ({
path: '.env',
});
anyone got any idea why