t3 env vercel deployment
attempting to use t3env and keep having build errors for vercel, any help would be appreciated
next config below
import {createJiti} from 'jiti';
import { fileURLToPath } from 'node:url';
const jiti = createJiti(fileURLToPath(import.meta.url));
await jiti.import('./src/env');
/** @type {import('next').NextConfig} */
export default {
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
},
};

Solution:Jump to solution
Resolved with the next.config.ts below
got the import syntax from create-t3-app boilerplate code
`/**...
6 Replies
@markr pretty not something huge, but I would appreciate if you could help me out here
Looks like you're missing env vars in vercel. Either add them, or add the configuration to disable env checks in whatever environment this is
Env
Never build your apps with invalid environment variables again. Validate and transform your environment with the full power of Zod.
it's preview deployment, I would try this
attempted and still same error
https://github.com/t3-oss/t3-env/issues/281
found this
GitHub
how to validate schema on build on next.config.ts · Issue #281 · ...
Next.js config now support .ts, and in this documentation https://env.t3.gg/docs/nextjs#validate-schema-on-build-(recommended) need jiti to load .ts on next.config.mjs. does this need to be updated...
Solution
Resolved with the next.config.ts below
got the import syntax from create-t3-app boilerplate code
/**
* Run
build or
dev with
SKIP_ENV_VALIDATION to skip env validation. This is especially useful
* for Docker builds.
*/
import './src/env.ts';
import type { NextConfig } from 'next';
const nextConfig: NextConfig = {
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
},
};
export default nextConfig;
cheers