getting keyValidator._parse is not a function in t3-env

I have set up t3-env in my Next.js 13 project, but when I run my project, I encounter the following error:
keyValidator._parse is not a function
TypeError: keyValidator._parse is not a function
keyValidator._parse is not a function
TypeError: keyValidator._parse is not a function
Could someone help me resolve this error? I am using the following dependencies: "zod": "3.20.2" "@t3-oss/env-nextjs": "0.6.0" "next": "^13.4.3""
2 Replies
jonesBIGASStruckrentalandstorage
seeing this again
"zod": "^3.22.2"
"@t3-oss/env-nextjs": "^0.7.1",
"next": "^14.0.2",
"zod": "^3.22.2"
"@t3-oss/env-nextjs": "^0.7.1",
"next": "^14.0.2",
sbs
sbs12mo ago
So this is a bit of a necro, but maybe this saves someone else looking for this error again. TLDR: Your env.mjs maybe isn't being typechecked so you accidentally did red instead of green
client: {
+ NEXT_PUBLIC_API_URL: z.string().url(),
- NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL,
},
client: {
+ NEXT_PUBLIC_API_URL: z.string().url(),
- NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL,
},
Want results from more Discord servers?
Add your server