jin-take / mpfar

platform for researcher in Japan
0 stars 0 forks source link

server errorの解消 #1

Closed jin-take closed 2 years ago

jin-take commented 2 years ago
Error: 
Invalid `prisma.post.findMany()` invocation:

  Query engine library for current platform "debian-openssl-1.1.x" could not be found.
You incorrectly pinned it to debian-openssl-1.1.x

This probably happens, because you built Prisma Client on a different platform.
(Prisma Client looked in "/usr/src/app/mpfar/node_modules/@prisma/client/runtime/libquery_engine-debian-openssl-1.1.x.so.node")

...

To solve this problem, add the platform "debian-openssl-1.1.x" to the "binaryTargets" attribute in the "generator" block in the "schema.prisma" file:
generator client {
  provider      = "prisma-client-js"
  binaryTargets = ["native"]
}

Then run "prisma generate" for your changes to take effect.
Read more about deploying Prisma Client: https://pris.ly/d/client-generator

と出るので、そこの解消をしていただきたいです。

souce

// typescript:pages/index.tsx

   6 | 
   7 | export const getStaticProps: GetStaticProps = async () => {
>  8 | const feed = await prisma.post.findMany({
     |             ^
   9 |   where: { published: true },
  10 |   include: {
  11 |     author: {