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!1 Reply
Solved by adding the key.