Prisma deploy error in production but no data in the log
See original GitHub issueToday 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.
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 npm@8.7.0` 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
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Migration troubleshooting in production - Prisma
The following guide describes issues relating to Prisma Migrate that can occur in production, and how to resolve them. This guide does not...
Read more >Error message reference - Prisma
Prisma Client throws a PrismaClientUnknownRequestError exception if the query engine returns an error related to a request that does not have an error...
Read more >Migration troubleshooting in development - Prisma
This guide describes how to resolve issues with Prisma Migrate in a development environment, which often involves resetting your database.
Read more >Troubleshooting database outages and connection issues
Learn about the possible reasons your database might be down or not connected and what you can do to fix it.
Read more >Prisma deploy does not deploy and does not show any errors
Prisma deploy does not deploy the datamodel. It shows that the deployment is successful. But the new datamodel does not appear in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not noise at all, we need to fix this! You should never end up in a situation where the CLI tells you
with the following logs:
and then nothing follows, it’s that easy. We’’ have to check howdeploy
is supposed to work and know the previous log output, and what we can do to fix that. (Also it seems we might benefit from making it clearer that an old migrate run failed, not the current one - I did definitely not catch that when reading the output you posted before.)Great to hear that my expectations aren’t too off here. I will try to come up with a reproduction the next few days ✌️