prisma / codemods

A Collection of Codemods for Prisma 2
https://www.prisma.io/docs/guides/upgrade-guides/upgrading-versions/codemods
34 stars 3 forks source link

add the platform "debian-openssl-1.1.x" #21

Closed alan345 closed 3 years ago

alan345 commented 3 years ago

I am using prisma "@prisma/client": "2.13.0", and "@prisma/cli": "2.13.0",

After building the typescript express server, no error was founded. When later prisma.companie.findMany() was invoked, it drops the error below. Unfortunately it was in production and we were not aware of this for a long time.

After rebuilding the typescript express server, it works fine. I cannot reproduce this error. I am now very concern this error might popup again in production.

Any recommendation?

Error:

1|taskCron | 2020-12-22 07:30 -08:00: { Error: 
1|taskCron | 2020-12-22 07:30 -08:00: Invalid `prisma.companie.findMany()` invocation:
1|taskCron | 2020-12-22 07:30 -08:00: 
1|taskCron | 2020-12-22 07:30 -08:00: 
1|taskCron | 2020-12-22 07:30 -08:00:   Query engine binary for current platform "debian-openssl-1.1.x" could not be found.
1|taskCron | 2020-12-22 07:30 -08:00: This probably happens, because you built Prisma Client on a different platform.
1|taskCron | 2020-12-22 07:30 -08:00: (Prisma Client looked in "/home/ubuntu/nacho/server/node_modules/@prisma/client/runtime/query-engine-debian-openssl-1.1.x")
1|taskCron | 2020-12-22 07:30 -08:00: 
1|taskCron | 2020-12-22 07:30 -08:00: Searched Locations:
1|taskCron | 2020-12-22 07:30 -08:00: 
1|taskCron | 2020-12-22 07:30 -08:00:   /home/ubuntu/nacho/server/node_modules/.prisma/client
1|taskCron | 2020-12-22 07:30 -08:00:   /home/ubuntu/nacho/server/node_modules/@prisma/client
1|taskCron | 2020-12-22 07:30 -08:00:   /home/ubuntu/nacho/server/node_modules/@prisma/client
1|taskCron | 2020-12-22 07:30 -08:00:   /home/ubuntu/nacho/server/node_modules/.prisma/client
1|taskCron | 2020-12-22 07:30 -08:00:   /home/ubuntu/nacho/server/prisma/prisma
1|taskCron | 2020-12-22 07:30 -08:00:   /home/ubuntu/nacho/server/node_modules/.prisma/client
1|taskCron | 2020-12-22 07:30 -08:00: 
1|taskCron | 2020-12-22 07:30 -08:00: 
1|taskCron | 2020-12-22 07:30 -08:00: To solve this problem, add the platform "debian-openssl-1.1.x" to the "generator" block in the "schema.prisma" file:
1|taskCron | 2020-12-22 07:30 -08:00: generator client {
1|taskCron | 2020-12-22 07:30 -08:00:   provider      = "prisma-client-js"
1|taskCron | 2020-12-22 07:30 -08:00:   binaryTargets = ["native"]
1|taskCron | 2020-12-22 07:30 -08:00: }
1|taskCron | 2020-12-22 07:30 -08:00: 
1|taskCron | 2020-12-22 07:30 -08:00: Then run "prisma generate" for your changes to take effect.
1|taskCron | 2020-12-22 07:30 -08:00: Read more about deploying Prisma Client: https://pris.ly/d/client-generator
1|taskCron | 2020-12-22 07:30 -08:00:     at PrismaClientFetcher.request (/home/ubuntu/nacho/server/node_modules/@prisma/client/runtime/index.js:79361:15)
1|taskCron | 2020-12-22 07:30 -08:00:     at process._tickCallback (internal/process/next_tick.js:68:7) clientVersion: '2.12.1' }
alan345 commented 3 years ago

wrong repository. Moved to: https://github.com/prisma/prisma/issues/4769