JudgeJLo
JudgeJLo
Explore posts from servers
TTCTheo's Typesafe Cult
Created by JudgeJLo on 4/16/2024 in #questions
Issues with Clerk and Unit testing
SOLVED: After talking with Clerk it seems that two things were necessary. I needed to use the require syntax to import the Clerk provider in my wrapper, and I needed to pull in the AppRouterContext as well.
3 replies
TTCTheo's Typesafe Cult
Created by JudgeJLo on 6/18/2023 in #questions
Invalid Environment Variables
The maintainers tell me that I should import the ENV directly using dotenv in the config.
16 replies
TTCTheo's Typesafe Cult
Created by JudgeJLo on 6/18/2023 in #questions
Invalid Environment Variables
Yeah, still no dice.
16 replies
TTCTheo's Typesafe Cult
Created by JudgeJLo on 6/18/2023 in #questions
Invalid Environment Variables
It has to be an issue with the envs themselves. I prefixed it with Next_Public and I'm still getting the exact same issues.
16 replies
TTCTheo's Typesafe Cult
Created by JudgeJLo on 6/18/2023 in #questions
Invalid Environment Variables
And I don't it the error on app run, just this function
16 replies
TTCTheo's Typesafe Cult
Created by JudgeJLo on 6/18/2023 in #questions
Invalid Environment Variables
Shouldn't my flag about skipping validation turn this off though?
16 replies
TTCTheo's Typesafe Cult
Created by JudgeJLo on 6/18/2023 in #questions
Invalid Environment Variables
That's awkward. I explicitly don't want to expose my connection string lol
16 replies
TTCTheo's Typesafe Cult
Created by JudgeJLo on 6/18/2023 in #questions
Invalid Environment Variables
[email protected] db:push drizzle-kit push:mysql --config=./drizzle.config.ts
drizzle-kit: v0.19.1
drizzle-orm: v0.27.0

Reading config file '/Users/jasonlong-hrf/HumanRightFirstDev/docdb/docdb-next/drizzle.config.ts'
:x: Invalid environment variables: {
NODE_ENV: [ 'Required' ],
DATABASE_CONNECTION_STRING: [ 'Required' ],
DATABASE_PASSWORD: [ 'Required' ],
DATABASE_URL: [ 'Required' ],
DATABASE_USERNAME: [ 'Required' ]
}
file:///Users/jasonlong-hrf/HumanRightFirstDev/docdb/docdb-next/node_modules/@t3-oss/env-nextjs/dist/index.mjs:1
import c from"zod";function l(e){let r=e.runtimeEnvStrict??e.runtimeEnv??process.env;if(e.skipValidation)return r;let a=typeof e.client=="object"?e.client:{},o=c.object(a),v=c.object(e.server),s=e.isServer??typeof window>"u",d=v.merge(o),i=s?d.safeParse(r):o.safeParse(r),f=e.onValidationError??(t=>{throw console.error("\u274C Invalid environment variables:",t.flatten().fieldErrors),new Error("Invalid environment variables")}),p=e.onInvalidAccess??(t=>{throw new Error("\u274C Attempted to access a server-side environment variable on the client")});return i.success===!1?f(i.error):new Proxy(i.data,{get(t,n){if(typeof n=="string")return!s&&!n.startsWith(e.clientPrefix)?p(n):t[n]}})}var u="NEXT_PUBLIC_";function C({runtimeEnv:e,...r}){return l({...r,clientPrefix:u,runtimeEnvStrict:e})}export{C as createEnv};

Error: Invalid environment variables
drizzle-kit: v0.19.1
drizzle-orm: v0.27.0

Reading config file '/Users/jasonlong-hrf/HumanRightFirstDev/docdb/docdb-next/drizzle.config.ts'
:x: Invalid environment variables: {
NODE_ENV: [ 'Required' ],
DATABASE_CONNECTION_STRING: [ 'Required' ],
DATABASE_PASSWORD: [ 'Required' ],
DATABASE_URL: [ 'Required' ],
DATABASE_USERNAME: [ 'Required' ]
}
file:///Users/jasonlong-hrf/HumanRightFirstDev/docdb/docdb-next/node_modules/@t3-oss/env-nextjs/dist/index.mjs:1
import c from"zod";function l(e){let r=e.runtimeEnvStrict??e.runtimeEnv??process.env;if(e.skipValidation)return r;let a=typeof e.client=="object"?e.client:{},o=c.object(a),v=c.object(e.server),s=e.isServer??typeof window>"u",d=v.merge(o),i=s?d.safeParse(r):o.safeParse(r),f=e.onValidationError??(t=>{throw console.error("\u274C Invalid environment variables:",t.flatten().fieldErrors),new Error("Invalid environment variables")}),p=e.onInvalidAccess??(t=>{throw new Error("\u274C Attempted to access a server-side environment variable on the client")});return i.success===!1?f(i.error):new Proxy(i.data,{get(t,n){if(typeof n=="string")return!s&&!n.startsWith(e.clientPrefix)?p(n):t[n]}})}var u="NEXT_PUBLIC_";function C({runtimeEnv:e,...r}){return l({...r,clientPrefix:u,runtimeEnvStrict:e})}export{C as createEnv};

Error: Invalid environment variables
16 replies
TTCTheo's Typesafe Cult
Created by JudgeJLo on 6/18/2023 in #questions
Invalid Environment Variables
More context: it seems the db:push is being registered as trying to use server envs on the client.
16 replies
TTCTheo's Typesafe Cult
Created by batata on 2/11/2023 in #questions
Deployment on AWS
Depending on your Next version Amplify could be easier.
9 replies
TTCTheo's Typesafe Cult
Created by JudgeJLo on 2/11/2023 in #questions
Typing Props
Odd. I literally tried that and I got an error about it being undefined. This is what I expected and works. Thanks.
6 replies