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.

2.23.0 can not recognize `binaryTargets: env("..")` inside `generator client` section

See original GitHub issue

Bug description

prisma [format|generate] is not working with env("BINARY_TARGETS") in latest prisma (2.23.0) 😢

ERROR 👇

Error: Schema Parsing P1012

Get config
error: Expected a String value, but received functional value "env".
  -->  schema.prisma:8
   |
 7 |   provider      = "prisma-client-js"
 8 |   binaryTargets = env("BINARY_TARGETS")
   |

@janpio

How to reproduce

just run prisma format or prisma generate with schema below

Expected behavior

should works

Prisma information

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

generator client {
  provider      = "prisma-client-js"
  binaryTargets = env("BINARY_TARGETS")
}

model User {
  id Int @id
}

Environment & setup

  • OS: Mac OS
  • Database: all
  • Node.js version: v14.16.0

Prisma Version

prisma               : 2.23.0
@prisma/client       : 2.23.0
Current platform     : darwin
Query Engine         : query-engine adf5e8cba3daf12d456d911d72b6e9418681b28b
Migration Engine     : migration-engine-cli adf5e8cba3daf12d456d911d72b6e9418681b28b
Introspection Engine : introspection-core adf5e8cba3daf12d456d911d72b6e9418681b28b
Format Binary        : prisma-fmt adf5e8cba3daf12d456d911d72b6e9418681b28b
Default Engines Hash : adf5e8cba3daf12d456d911d72b6e9418681b28b
Studio               : 0.393.0

parent https://github.com/prisma/prisma/issues/6830

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
hehex9commented, Jun 1, 2021

no problem 👍 , thanks for working on this, will definitely try it out then

2reactions
janpiocommented, May 31, 2021

Will only happen after the release, as the change was too big to just get through the pipeline. We will hopefully have a dev version early with 2.25.0 though so you can test this @hehex9.

Read more comments on GitHub >

github_iconTop Results From Across the Web

docker-compose not recognizing prisma generate or changes
I have several docker images I'm trying combine using docker-compose . My server image is ...
Read more >
Environment variables — conan 1.56.0 documentation
So it doesn't make sense to provide a setting or option for this. So it can be set with the environment variable CONAN_CMAKE_GENERATOR...
Read more >
Prisma 2.26.0 Release - GitClear
When using raw SQL queries for deletion, Prisma Client won't perform any checks, and deleting a referenced object will effectively cause the ...
Read more >
Environment Variables | Buildkite Documentation
This number increases by 1 with every build, and is guaranteed to be unique within each pipeline. Example: 1514. BUILDKITE_BUILD_PATH # This value...
Read more >
Chapter 3. Environment variables Red Hat Quay 3.7
3.2. Database connection pooling. Red Hat Quay is composed of many different processes which all run within the same container. Many of these...
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