Run yarn prisma:generate:prod
yarn prisma:generate:prod
shell: /bin/bash -e {0}
yarn run v1.22.10
$ PRISMA_BINARY_TARGET=rhel-openssl-1.0.x prisma generate
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Error: Unexpected token r in JSON at position 0
error Command failed with exit code 1.
I solved it by typing the string directly into the schema.prisma file rather than using an environment variable. I have a docker localstack environment set up so I will never need my native binary for it, so it works for me.
`datasource db {
provider = "sqlserver"
url = env("PRISMA_DATABASE_URL")
}
I'm having the following error
Run yarn prisma:generate:prod
yarn prisma:generate:prod
shell: /bin/bash -e {0}
yarn run v1.22.10
$ PRISMA_BINARY_TARGET=rhel-openssl-1.0.x prisma generate
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Error: Unexpected token r in JSON at position 0
error Command failed with exit code 1.
Please help me
I solved it by typing the string directly into the schema.prisma file rather than using an environment variable. I have a docker localstack environment set up so I will never need my native binary for it, so it works for me.
`datasource db {
provider = "sqlserver"
url = env("PRISMA_DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
binaryTargets = ["rhel-openssl-1.0.x"]
}`