Cristobal Burgos
TTCTheo's Typesafe Cult
•Created by Cristobal Burgos on 10/3/2023 in #questions
Missing Secret on UTApi
Everytime I try to call a function that comes from the UTApi in my server it returns an error ❌ tRPC failed on API_NAME: Missing
UPLOADTHING_SECRET
env variable.
I have double checked the key is on the .env and even initialized the UTApi: as follow
import { UTApi } from "uploadthing/server";
export const utapi = new UTApi({ apiKey: process.env.UPLOADTHING_SECRET });
Is there anything I'm missing here?
Thanks!3 replies