I’m getting this while the Vercel project deploying please can anybody help me, This project was build in React Query and supabase database
import supabase, { supabaseUrl } from "./supabase";
export async function signup({ fullName, email, password }) {
const { data, error } = await supabase.auth.signUp({
email,
password,
options: {
data: {
fullName,
avatar: "",
},
},
});
if (error) {
throw new Error(error.message);
}
return data;
}
export async function Login({ email, password }) {
let { data, error } = await supabase.auth.signInWithPassword({
email,
password,
});
if (error) {
throw new Error(error.message);
}
console.log(data);
return data;
}
export async function getCurrentUser() {
const { data: session } = await supabase.auth.getSession();
if (!session.session) return null;
const { data, error } = await supabase.auth.getUser();
// console.log(data);
if (error) throw new Error(error.message);
return data?.user;
}
export async function logout() {
const { error } = await supabase.auth.signOut();
if (error) throw new Error(error.message);
}
export async function updateCurrentUser({ password, fullName, avatar }) {
//1. update password or fullname
let updateData;
if (password) updateData = { password };
if (fullName) updateData = { data: { fullName } };
const { data, error } = await supabase.auth.updateUser(updateData);
if (error) throw new Error(error.message);
if (!avatar) return data;
// 2. upload avatar image
const fileName = `avatar-${data.user.id}-${Math.random()}`;
const { error: storageError } = await supabase.storage
.from("avatars")
.upload(fileName, avatar);
if (storageError) throw new Error(storageError.message);
//3. update the avatar in user
const { data: updatedUser, error: updateError } =
await supabase.auth.updateUser({
data: {
avatar: `${supabaseUrl}/storage/v1/object/public/avatars/${fileName}`,
},
});
if (updateError) throw new Error(updateError.message);
return updatedUser;
}