Next.js Discord

Discord Forum

Error type any when deploy project nextjs 13 to Vercel

Unanswered
Anh Tú posted this in #help-forum
Open in Discord
I'm having trouble pushing my project to vercel, even though before it was completely normal when I ran run build in vscode, but now it's like that. Does anyone have any suggestions to fix this error?

18 Replies

Shy Albatross
npm run lint
@Shy Albatross `npm run lint`
i tried it but nothing better happened
@Shy Albatross `npm run lint`
No ESLint warnings or errors
Shy Albatross
npm run build and then npm run start is not producing the error?
@Shy Albatross `npm run build` and then `npm run start` is not producing the error?
Yes, it works perfectly fine, but when deploying, an error occurs
Shy Albatross
do you have the file typed?
yes I have
Shy Albatross
oh the type is coming from prisma
that's right i made prisma connect to mongodb
Shy Albatross
it doesn't have those types when it's building in Vercel, you missed a step but I'm not good with prisma so can't help you
Is it because it cannot connect to the database when deployed to Vercel?
Pixiebob
Do you have npx prisma generate added to your build code? If I remember that is needed
Normally prisma will throw an error if it isn't included but worth checking
@Pixiebob Normally prisma will throw an error if it isn't included but worth checking
you mean it
Pixiebob
Yeah that looks correct
@Pixiebob Yeah that looks correct
but it still doesn't run:lolsob:
Pixiebob
At any point in your build logs do you see it running prisma generate?