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.

Generating client to custom location with Next.js is broken

See original GitHub issue

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 https://github.com/blitz-js/blitz/pull/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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:21 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
timsuchanekcommented, Dec 2, 2020

Just tried it out - I can confirm that this is fixed in the latest version. Let me know if you face any further issues @colinhacks and @flybayer 🙂

1reaction
timsuchanekcommented, Nov 24, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced Features: Error Handling - Next.js
Error Handling. This documentation explains how you can handle development, server-side, and client-side errors. Handling Errors in Development.
Read more >
Advanced Features: Debugging - Next.js
Customize to your liking (e.g. Browser for debugging, store as project file), and click OK . Run this debug configuration, and the selected...
Read more >
Advanced Features: Next.js Compiler
It's something you can call to perform code transformations (either built-in or custom). Running those transformations happens through higher-level tools like ...
Read more >
Advanced Features: Output File Tracing - Next.js
Next.js automatically traces which files are needed by each page to allow for easy deployment of your application. Learn how it works here....
Read more >
Going to Production - Next.js
Each file inside your pages/ directory will automatically be code split into ... Since Next.js runs on both the client and server, there...
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