question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

You already added the platform "debian-openssl-1.1.x" to the "generator" block in the "schema.prisma" file as described in https://pris.ly/d/client-generator, but something went wrong.

See original GitHub issue

I’m getting an error on a Docker node:slim container:

{
  "errors": [
    {
      "message": "\nInvalid `prisma.user.findUnique()` invocation:\n\n\nQuery engine library for current platform \"debian-openssl-1.1.x\" could not be found.\nYou incorrectly pinned it to debian-openssl-1.1.x\n\nThis probably happens, because you built Prisma Client on a different platform.\n(Prisma Client looked in \"/usr/src/app/generated/prisma-client/runtime/libquery_engine-debian-openssl-1.1.x.so.node\")\n\nSearched Locations:\n\n  /usr/src/app/.prisma/client\n  /usr/src/app/src/generated/prisma-client\n  /usr/src/app/generated/prisma-client\n  /usr/src/app/generated/prisma-client\n  /usr/src/app/prisma\n  /tmp/prisma-engines\n  /usr/src/app/generated/prisma-client\n\nYou already added the platform \"debian-openssl-1.1.x\" to the \"generator\" block\nin the \"schema.prisma\" file as described in https://pris.ly/d/client-generator,\nbut something went wrong. That's suboptimal.\n\nPlease create an issue at https://github.com/prisma/prisma/issues/new",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "posts"
      ],
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "exception": {
          "clientVersion": "4.4.0"
        }
      }
    }
  ],
  "data": {
    ...
  }
}

My schema:

generator client {
    provider      = "prisma-client-js"
    output        = "../generated/prisma-client"
    binaryTargets = ["native"]
}

generator pothos {
    provider      = "prisma-pothos-types"
    output        = "../generated/pothos-types.ts"
    binaryTargets = ["native"] //, "debian-openssl-1.1.x"]
}

datasource db {
    provider = "postgresql"
    url      = env("DATABASE_URL")
}

model User {
    id        Int      @id @default(autoincrement())
    createdAt DateTime @default(now())
    updatedAt DateTime @updatedAt
    username  String   @unique
    email     String   @unique
    password  String
    posts     Post[]
}

model Post {
    id        Int      @id @default(autoincrement())
    createdAt DateTime @default(now())
    updatedAt DateTime @updatedAt
    title     String
    content   String?
    author    User     @relation(fields: [authorId], references: [id])
    authorId  Int
    points    Int      @default(0)
}

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
satvikpendemcommented, Oct 5, 2022

Hm I am actually generating it in a custom location already:

generator client {
    provider      = "prisma-client-js"
    output        = "../generated/prisma-client" // this becomes src/generated/prisma-client
    binaryTargets = ["native"]
}

And yes it happens in my dev env as well as Docker, however it seems to be fixed now that I have copied over the query engine file to dist.

1reaction
millspcommented, Oct 4, 2022

Hey @satvikpendem would you able to share the exact steps for us to reproduce this? Only if you have time, we’d appreciate a reproduction. That would be very helpful. Thanks @annibuliful for the extra information!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prisma Query engine library for current platform "debian ...
You incorrectly pinned it to debian-openssl-1.1.x This probably happens, ... in the "generator" block in the "schema.prisma" file: generator ...
Read more >
Prisma Client
Prisma Client is an auto-generated, type-safe query builder generated based on the models and attributes of your Prisma schema.
Read more >
Prisma Client Binary Not Copied for Netlify Lambda Functions ...
x" to the "generator" block in the "schema.prisma" file as described in https://pris.ly/d/client-generator, but something went wrong. That's suboptimal.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found