Next.js Discord

Discord Forum

I push on git my next project for update automatically on vercel but i got this error :

Unanswered
Polish Hound posted this in #help-forum
Open in Discord
Polish HoundOP

21 Replies

Polish HoundOP
this is the expanded error :
@Polish Hound Click to see attachment
what nextjs version are you using? according to https://github.com/vercel/next.js/issues/46493 it should work with the latest version
Polish HoundOP
nextJS 13
as in the full version number. 13.x.y, what are x and y
Polish HoundOP
13.4.19
hmm then i need a [minimal reproduction repository](https://nextjs-faq.com/minimal-reproduction-repository) to debug this
Polish HoundOP
sorry but i read and i don't understand
basically, i need a simplified version of your current repository where the bug is reproduced, so i can clone and debug locally
Polish HoundOP
if this helps you I had no errors before creating this file:
import prisma from "@/app/libs/prismadb";
import getCurrentUser from "./getCurrentUser";

const getAreFriends = async (
    friendId: string
) => {
    try {

        const currentUser = await getCurrentUser();

        if (!currentUser?.id) {
            return [];
        }

        const user = await prisma.user.findUnique({
            where: {
                id: currentUser.id as string,
            },
            include: {
                friends: {
                    where: {
                        id: friendId as string,
                    },
                },
            },
        });

        if (!user?.friends) {
            return false
        } else {
            return true
        }
    } catch (error: any) {
        return false;
    }
}

export default getAreFriends;

and use it like this :
const areFriends = getAreFriends(data.id);
if (!areFriends) {
  // action
} else {
  // action
}
make a simplified version. my timetable doesn't allow me to debug a full-scale application
Polish HoundOP
ok i undersatnd
but how to simplify ?
so the error com from this file
@joulev
i can't make a simplified repo sorry because i don't understand hox to make
but i found in wich file is the error
Then idk, sorry. I can’t open and debug locally and I don’t have any educated guesses here, so I can’t help
Polish HoundOP
ok thanks anyway