Russell Ormes
09/14/2021, 9:11 AMlinux-musl to my binaryTargets in my schema. I added native (not sure if it is necessary) for the local build, on Ubuntu 18.04.
datasource db {
provider = "postgresql"
binaryTargets = ["native", "linux-musl"]
url = env("DATABASE_URL")
}
OK, so my assumption it that on running the client generation script, the binary should get downloaded into the output directory. The only engine binary that is copied to the output directory is libquery_engine-debian-openssl-1.1.x.so.node which satisfies the native option, but nothing for linux-musl. Checking the directory node_modules/@prisma/engines/ I also see that only the *-debian-* engines are present.
I guess my question is, how do I get the client generator to download the binaries required by the biaryTargets array? Or is there something I am missing here?
I have searched here for a solution but no-one appears to have the same issue.Ryan
09/14/2021, 9:46 AMnative is needed.Russell Ormes
09/14/2021, 9:51 AMlinux-musl binary not being downloaded. I will try that again.
Given that I am generating the client on a machine using Ubuntu 18.04, do you have any insight why it might ignore the linux-musl requirement?Ryan
09/14/2021, 9:53 AMlinux-musl binary gets downloaded as I have native set in binaryTargets.
Just tried it on the latest version of Prisma and works fine.Ryan
09/14/2021, 9:54 AMlinux-musl binary get downloaded on your Ubuntu machine if you have it mentioned in schema.prisma?Russell Ormes
09/14/2021, 9:58 AMbinaryTargets and call prisma generate on the Ubuntu machine and nothing gets downloaded.
I have my schema file in a custom directory and I have a custom output, so might that have an effect?
datasource db {
provider = "postgresql"
binaryTargets = ["native", "linux-musl"]
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
output = "../../../../node_modules/.prisma/my-app"
}
then run
prisma generate --schema ./apps/my-app/src/prisma/schema.prismaRyan
09/14/2021, 10:01 AMoutput field and let it generate in the the default folder i.e. node_modules?Russell Ormes
09/14/2021, 10:02 AMRussell Ormes
09/14/2021, 10:02 AMRyan
09/14/2021, 10:06 AMnative?Russell Ormes
09/14/2021, 10:58 AMRussell Ormes
09/14/2021, 11:02 AMnode_modules/.prisma/my-client/
index-browser.js index.js runtime
index.d.ts libquery_engine-linux-musl.so.node schema.prisma
ok, so it worked building inside the container with nativeRussell Ormes
09/14/2021, 11:03 AMbinaryTargets array...Russell Ormes
09/14/2021, 11:18 AMRyan
09/14/2021, 11:19 AMRussell Ormes
09/14/2021, 11:24 AM