Skip to content

Generating client to custom location with Next.js is broken #2195

@flybayer

Description

@flybayer

Bug description

I'm using a custom schema location and custom prisma client location. And it's failing.

  • Schema: db/schema.prisma
  • Client: db/.generated-prisma-client
(node:1879) UnhandledPromiseRejectionWarning: Error: Query engine binary for current platform "darwin" could not be found.
This probably happens, because you built Prisma Client on a different platform.
(Prisma Client looked in "/query-engine-darwin")
Files in /:
  .DS_Store
  .VolumeIcon.icns
  .file
  .fseventsd
  .vol
  Applications
  Library
  Preboot
  System
  Users
  Volumes
  bin
  cores
  dev
  etc
  home
  opt
  private
  sbin
  tmp
  usr
  var
You already added the platform "native" to the "generator" block
in the "schema.prisma" file as described in https://pris.ly/d/client-generator,
but something went wrong. That's suboptimal.
Please create an issue at https://github.com/prisma/prisma-client-js/issues/new

How to reproduce

  1. Check out [legacy-framework] Generate prisma client into project instead of node_modules blitz-js/blitz#124: git clone -b prisma-gen git@github.com:blitz-js/blitz.git
  2. yarn
  3. yarn build
  4. cd examples/store
  5. Set your DATABASE_URL environment variable for postgres
  6. yarn blitz db migrate
  7. yarn blitz start
  8. Open http://localhost:3000/admin/products
  9. See error in console.

Expected behavior

Should work

Environment & setup

  • OS: macOS
  • Database: PostgreSQL
  • Prisma version: 2.0.0-alpha.1081"
  • Node.js version: 12.6.1

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions