Next.js Discord

Discord Forum

Failed to collect page data for /robots.txt

Answered
Polish posted this in #help-forum
Open in Discord
PolishOP
Has anyone encountered this issue? It seems like it only occurs when building the app on Vercel because it builds successfully on my local machine.
Answered by joulev
update your build in package.json from next build to prisma generate && next build
View full answer

13 Replies

PolishOP
here is my robots.ts
PolishOP
Failed to collect page data for /robots.txt
above it
there is another error
PolishOP
i dont think its prisma
still, what's the error
an error of any types typically aborts the build and results in an overall build error
PolishOP
@Polish Click to see attachment
fix the prisma error
update your build in package.json from next build to prisma generate && next build
Answer
@joulev update your `build` in package.json from `next build` to `prisma generate && next build`
PolishOP
it work thank you .. it seems like post install prisma generate not working properly? 😅