Next.js Discord

Discord Forum

Can't host it on Vercel

Unanswered
Blue swimming crab posted this in #help-forum
Open in Discord
Blue swimming crabOP
I still get problems with hosting my nextjs project on Vercel.

jarondeklein@Jarons-MacBook-Air bit-invoice-panel % npm run vercel-build                                                                             

> bit-invoices@0.1.0 vercel-build
> prisma generate && prisma migrate deploy && next build

Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma

✔ Generated Prisma Client (v6.4.1) to ./prisma/generated/client in 71ms

Start by importing your Prisma Client (See: https://pris.ly/d/importing-client)

Tip: Interested in query caching in just a few lines of code? Try Accelerate today! https://pris.ly/tip-3-accelerate

Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": MySQL database "jaron_bit-invoice" at "web01.viperhosting.nl"

2 migrations found in prisma/migrations


No pending migrations to apply.
   ▲ Next.js 15.2.1
   - Environments: .env

   Creating an optimized production build ...
 ✓ Compiled successfully
   Skipping validation of types
   Skipping linting
   Collecting page data  ..Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.
    at 13641 (.next/server/app/api/auth/[...nextauth]/route.js:1:1475)
    at t (.next/server/webpack-runtime.js:1:143)
    at 84001 (.next/server/app/api/auth/[...nextauth]/route.js:1:6475)
    at t (.next/server/webpack-runtime.js:1:143)
    at 96595 (.next/server/app/api/auth/[...nextauth]/route.js:1:7280)
    at t (.next/server/webpack-runtime.js:1:143)
    at r (.next/server/app/api/auth/[...nextauth]/route.js:1:7851)
    at <unknown> (.next/server/app/api/auth/[...nextauth]/route.js:1:7886)
    at t.X (.next/server/webpack-runtime.js:1:2214)

> Build error occurred
[Error: Failed to collect page data for /api/auth/[...nextauth]] {
  type: 'Error'
}


This is my build error

7 Replies

Dutch
Collecting page data ..Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again. @Blue swimming crab
Blue swimming crabOP
But i already run prisma generate
Its in the script
"vercel-build": "prisma generate && prisma migrate deploy && next build"
Dutch
is it working at local
Blue swimming crabOP
THe build isnt
npm run dev is working