invalid env variable error with drizzle and neondb

So Im using nextjs + drizzle + neon db Ive setup a script to print my databse i get this error:
Invalid environment variables: {
DATABASE_URL: [ 'Required' ],
CLERK_SECRET_KEY: [ 'Required' ],
TAVILY_API_KEY: [ 'Required' ],
GROQ_API_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_UP_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL: [ 'Required' ]
}
file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29
throw new Error("Invalid environment variables");
^

Error: Invalid environment variables
at onValidationError (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29:15)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:35:16)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-nextjs/dist/index.js:12:12)
at file:///C:/Users/rkmad/partnerfind.tech/src/env.js:4:20
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
Invalid environment variables: {
DATABASE_URL: [ 'Required' ],
CLERK_SECRET_KEY: [ 'Required' ],
TAVILY_API_KEY: [ 'Required' ],
GROQ_API_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_UP_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL: [ 'Required' ]
}
file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29
throw new Error("Invalid environment variables");
^

Error: Invalid environment variables
at onValidationError (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29:15)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:35:16)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-nextjs/dist/index.js:12:12)
at file:///C:/Users/rkmad/partnerfind.tech/src/env.js:4:20
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
` 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
Gist
env.js
GitHub Gist: instantly share code, notes, and snippets.
Gist
index.ts
GitHub Gist: instantly share code, notes, and snippets.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server