Michael Gates
08/11/2022, 6:37 PMIn the postinall hook of this package, all engines available for the current platform are downloaded from the Prisma CDN
But I want to download for all platforms, not just the current.Austin
08/11/2022, 6:51 PMbinaryTargets
field in the generator
block of your schema.prisma
to tell Prisma which engines to download. You can find a list of options in our docs here.
Downloading all engines is probably unadvisable as it would take a large amount of space when itβs only common to need a few engines.Michael Gates
08/11/2022, 6:59 PMbinaryTargets = ["native", "darwin", "debian-openssl-1.1.x", "rhel-openssl-1.0.x"]
Austin
08/11/2022, 7:04 PMMichael Gates
08/11/2022, 7:06 PMAustin
08/11/2022, 7:21 PMMichael Gates
08/11/2022, 7:52 PMnodeLinker: node-modules
in my .yarnrc.yml
file, deleted .yarn/cache
and .yarn/unplugged
, then re-ran yarn install
. Inside node_modules/@prisma/engines
I am still only seeing the engine for my current system despite having the targets specified. Does Prisma not work at all on Yarn 2/3?Austin
08/11/2022, 8:00 PMnode_modules/.prisma/client
as well.Michael Gates
08/11/2022, 8:01 PMAustin
08/11/2022, 8:05 PMMichael Gates
08/11/2022, 8:08 PMAustin
08/11/2022, 8:14 PMnpx prisma generate
?Michael Gates
08/11/2022, 8:19 PMEnvironment variables loaded from .env
Prisma schema loaded from src/prisma/schema.prisma
Warning: Your current platform `darwin-arm64` is not included in your generator's `binaryTargets` configuration ["darwin","windows"].
To fix it, use this generator config in your schema.prisma:
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "darwin", "windows"]
}
Note, that by providing `native`, Prisma Client automatically resolves `darwin-arm64`.
Read more about deploying Prisma Client: <https://github.com/prisma/prisma/blob/main/docs/core/generators/prisma-client-js.md>
Austin
08/11/2022, 8:23 PM