Error type any when deploy project nextjs 13 to Vercel
Unanswered
Anh Tú posted this in #help-forum
Anh TúOP
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`
Anh TúOP
i tried it but nothing better happened
@Shy Albatross `npm run lint`
Anh TúOP
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?
Anh TúOP
Yes, it works perfectly fine, but when deploying, an error occurs
Shy Albatross
do you have the file typed?
Shy Albatross
oh the type is coming from prisma
Anh TúOP
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
Anh TúOP
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
Yeah that looks correct
@Pixiebob Yeah that looks correct
Anh TúOP
but it still doesn't run

Pixiebob
At any point in your build logs do you see it running prisma generate?
@Pixiebob At any point in your build logs do you see it running prisma generate?
Anh TúOP
Yes, it still works normally