Generating client to custom location with Next.js is broken
See original GitHub issueBug 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
- Check out https://github.com/blitz-js/blitz/pull/124:
git clone -b prisma-gen git@github.com:blitz-js/blitz.git
yarn
yarn build
cd examples/store
- Set your
DATABASE_URL
environment variable for postgres yarn blitz db migrate
yarn blitz start
- Open http://localhost:3000/admin/products
- 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:
- Created 3 years ago
- Reactions:2
- Comments:21 (12 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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 🙂
This will be fixed in https://github.com/vercel/vercel/pull/5455