Eddy Nguyen
07/04/2021, 7:18 AMclient.binaryTargets.
It looks like there’s this issue which has been addressed in this PR. However, I’m still having problems, and may be someone can help clarify how I’m supposed to use it.
Here’s the related part in my schema:
generator client {
provider = "prisma-client-js"
binaryTargets = env("PRISMA_BINARY_TARGET") // I also tried to use `[env("PRISMA_BINARY_TARGET")]` but getting the same errors regardless
}
I have JSON.parse error when I try to do this: PRISMA_BINARY_TARGET=native prisma generate . Note that this was working in version 2.22
I think it’s because the parse function expects the env to be a JSON string 🤔
Anyways, running the following command works: PRISMA_BINARY_TARGET='[\"native\"]' prisma generate . To me, this is less ideal than the previous version because I didn’t know what to use until I looked at the source code. 😅 ( Maybe there are some documentation I’m missing )
Is this a bug? Happy to create an issue to follow up 🙂janpio
janpio
["native", "windows"] or similar usually.