other-emerald
other-emerald9mo ago

environment with t3 stack

I was trying to make a environment veriable using t3 stack but i always get error about type not found. how can i solve it?
7 Replies
kapa.ai
kapa.ai9mo ago
Hi @dc_alexyt. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. The information extracts provided do not contain specific details about setting up environment variables using a t3 stack. However, environment variables are a common aspect of many frameworks and languages. In the context of Next.js, a React framework, environment variables are handled by default and their usage has been made seamless and straightforward from version 9.4 onwards. You can learn more about this from the Next.js environment variables blog (https://refine.dev/blog/next-js-environment-variables#introduction). For more specific guidance related to your t3 stack, I would recommend referring to the relevant documentation or community forums. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai9mo ago
<@398749213795680259> kapa.ai is still learning and improving, please let us know how it did by reacting below
rare-sapphire
rare-sapphire9mo ago
Hello @dc_alexyt could you be more specific on your issue?
other-emerald
other-emerald9mo ago
@batuhanw so i created a enviremonment variable in my nextjs app using t3 stack this is my env.mjs
import { createEnv } from '@t3-oss/env-nextjs';
import { z } from 'zod';

export const env = createEnv({
server: {},
client: {
NEXT_PUBLIC_API_BASE_URL: z.string().url(),
},
runtimeEnv: {
NEXT_PUBLIC_API_BASE_URL: process.env.NEXT_PUBLIC_API_BASE_URL,
},
});
import { createEnv } from '@t3-oss/env-nextjs';
import { z } from 'zod';

export const env = createEnv({
server: {},
client: {
NEXT_PUBLIC_API_BASE_URL: z.string().url(),
},
runtimeEnv: {
NEXT_PUBLIC_API_BASE_URL: process.env.NEXT_PUBLIC_API_BASE_URL,
},
});
also I imported it in my nextconfig.mjs when i run ci I always get an error
other-emerald
other-emerald9mo ago
No description
other-emerald
other-emerald9mo ago
if i run build in my local build succeed.
rare-sapphire
rare-sapphire8mo ago
This is not related to refine. It's an issue between T3 and NextJS. Please consider clicking the link in the error message or search google.