Skip to content

Schema Engine Error: db error: prepared statement "s0" does not exist #2426

@shailendrakashyap

Description

@shailendrakashyap

Describe the Bug

I am facing this unknown issue while deploying to Vercel.

Error: Schema engine error:
23:18:04.355 db error: ERROR: prepared statement "s0" does not exist
23:18:04.355
23:18:04.355
23:18:04.375 error Command failed with exit code 1.

Database

PostgreSQL

Relevant log output

[23:16:28.325] Running build in Washington, D.C., USA (East) – iad1
[23:16:28.432] Cloning github.com/shailendrakashyap/analytics (Branch: main, Commit: db20730)
[23:16:28.800] Previous build cache not available
[23:16:28.986] Cloning completed: 553.587ms
[23:16:29.421] Running "vercel build"
[23:16:29.946] Vercel CLI 32.6.1
[23:16:30.490] Installing dependencies...
[23:16:30.847] yarn install v1.22.17
[23:16:30.976] [1/4] Resolving packages...
[23:16:31.421] [2/4] Fetching packages...
[23:17:27.537] warning [email protected]: The engine "pnpm" appears to be invalid.
[23:17:27.571] [3/4] Linking dependencies...
[23:17:27.574] warning " > @umami/[email protected]" has incorrect peer dependency "@prisma/client@^4.8.0".
[23:17:27.599] warning " > [email protected]" has incorrect peer dependency "react@^16.8.0 || 17.x".
[23:17:27.599] warning " > [email protected]" has incorrect peer dependency "react-dom@^16.8.0 || 17.x".
[23:17:27.599] warning " > [email protected]" has unmet peer dependency "prop-types@^15.7.2".
[23:17:27.617] warning " > [email protected]" has incorrect peer dependency "rollup@^2.0.0".
[23:17:27.618] warning " > [email protected]" has incorrect peer dependency "stylelint@>= 11.x < 15".
[23:17:27.618] warning " > [email protected]" has incorrect peer dependency "stylelint@^14.10.0".
[23:17:27.657] warning Workspaces can only be enabled in private projects.
[23:17:48.017] [4/4] Building fresh packages...
[23:17:52.831] $ node -e "if (process.env.NODE_ENV !== 'production'){process.exit(1)} " || husky install
[23:17:52.975] husky - Git hooks installed
[23:17:52.997] Done in 82.16s.
[23:17:53.050] Detected Next.js version: 13.5.6
[23:17:53.052] Running "yarn run build"
[23:17:53.249] yarn run v1.22.17
[23:17:53.321] $ npm-run-all check-env build-db check-db build-tracker build-geo build-app
[23:17:53.735] $ node scripts/check-env.js
[23:17:54.079] $ npm-run-all copy-db-files build-db-client
[23:17:54.476] $ node scripts/copy-db-files.js
[23:17:54.625] Database type detected: postgresql
[23:17:54.633] Copied /vercel/path0/db/postgresql to /vercel/path0/prisma
[23:17:54.894] $ prisma generate
[23:17:55.568] Prisma schema loaded from prisma/schema.prisma
[23:17:56.291] 
[23:17:56.292] ✔ Generated Prisma Client (v5.3.1) to ./node_modules/@prisma/client in 208ms
[23:17:56.292] 
[23:17:56.292] Start using Prisma Client in Node.js (See: https://pris.ly/d/client)
[23:17:56.292] 
[23:17:56.292] import { PrismaClient } from '@prisma/client'
[23:17:56.293] const prisma = new PrismaClient()
[23:17:56.293] ```
[23:17:56.293] or start using Prisma Client at the edge (See: https://pris.ly/d/accelerate)
[23:17:56.293] ```
[23:17:56.293] import { PrismaClient } from '@prisma/client/edge'
[23:17:56.293] const prisma = new PrismaClient()
[23:17:56.293] ```
[23:17:56.293] 
[23:17:56.294] See other ways of importing Prisma Client: http://pris.ly/d/importing-client
[23:17:56.294] 
[23:17:56.721] $ node scripts/check-db.js
[23:17:56.843] ✓ DATABASE_URL is defined.
[23:17:58.048] ✓ Database connection successful.
[23:18:00.166] ✓ Database version check successful.
[23:18:04.355] Error: Schema engine error:
[23:18:04.355] db error: ERROR: prepared statement "s0" does not exist
[23:18:04.355] 
[23:18:04.355] ✗ Command failed: prisma migrate deploy
[23:18:04.355] Error: Schema engine error:
[23:18:04.355] db error: ERROR: prepared statement "s0" does not exist
[23:18:04.355] 
[23:18:04.355] 
[23:18:04.375] error Command failed with exit code 1.
[23:18:04.378] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[23:18:04.407] ERROR: "check-db" exited with 1.
[23:18:04.425] error Command failed with exit code 1.
[23:18:04.426] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[23:18:04.456] Error: Command "yarn run build" exited with 1
[23:18:05.089]

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

Vercel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions