Skip to content

Prisma deploy error in production but no data in the log #12856

@alan345

Description

@alan345

Today we deployed in production and we get an error

Error: P3009
migrate found failed migrations in the target database, new migrations will not be applied. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve
The `20220414162927_prisma_upgrade` migration started at 2022-04-16 16:28:01.302 UTC failed with the following logs:

When we checked the logs in _prisma_migrations, no issued was found and the migration was successfully applied.

image

It looks like the NPM warning triggered this wrong error message. (NPM 8.7.0 was released 2 days ago) https://www.npmjs.com/package/npm

Full Log:

Prisma schema loaded from prisma/schema.prisma
--
Datasource "db": MySQL database "na" at "db-prod-principal-database.us-west-2.rds.amazonaws.com:3306"
60 migrations found in prisma/migrations
Applying migration `20220414162927_prisma_upgrade`
Done in 72.52s.
Prisma schema loaded from prisma/schema.prisma
Datasource "db": MySQL database "na" at "db-prod-principal-database.us-west-2.rds.amazonaws.com:3306"
60 migrations found in prisma/migrations
Error: P3009
migrate found failed migrations in the target database, new migrations will not be applied. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve
The `20220414162927_prisma_upgrade` migration started at 2022-04-16 16:28:01.302 UTC failed with the following logs:
npm notice
npm notice New minor version of npm available! 8.5.5 -> 8.7.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.7.0>
npm notice Run `npm install -g [email protected]` to update!
npm notice
Prisma schema loaded from prisma/schema.prisma
✔ Generated Prisma Client (3.12.0 \| library) to ./node_modules/@prisma/client in 3.13s
You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client

import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()

Type "Node" is missing a "__resolveType" resolver. Pass false into "resolverValidationOptions.requireResolversForResolveType" to disable this warning.
🚀 Server ready at http://localhost:4000/ - Env: production

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions