Intermitent error on OSX
See original GitHub issueBug description
I get this error sometimes since switching to the latest alpha:
(node:2510) UnhandledPromiseRejectionWarning: Error:
Invalid `prisma.user.findOne()` invocation:
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 "/Users/Sytten/Projects/******/packages/graphql/node_modules/@prisma/client/runtime/query-engine-darwin")
To solve this problem, add the platform "darwin" to the "generator" block in the "schema.prisma" file:
generator client {
provider = "prisma-client-js"
binaryTargets = ["native"]
}
Then run "prisma generate" for your changes to take effect.
Read more about deploying Prisma Client: https://pris.ly/d/client-generator
at PrismaClientFetcher.request (/Users/Sytten/Projects/******/packages/graphql/node_modules/@prisma/client/runtime/index.js:1:51672)
(node:2510) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2510) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I have to delete the database and start over.
How to reproduce
Hard to tell, I don’t see a particular pattern.
Environment & setup
@prisma/cli : 2.0.0-alpha.989
Current platform : darwin
Query Engine : prisma 2accb9c7eacdc984874eaeb63377fe705dfd3203 (at /Users/Sytten/Projects/******/packages/graphql/node_modules/@prisma/cli/query-engine-darwin)
Migration Engine : migration-engine-cli 2accb9c7eacdc984874eaeb63377fe705dfd3203 (at /Users/Sytten/Projects/******/packages/graphql/node_modules/@prisma/cli/migration-engine-darwin)
Introspection Engine : introspection-core 2accb9c7eacdc984874eaeb63377fe705dfd3203 (at /Users/Sytten/Projects/******/packages/graphql/node_modules/@prisma/cli/introspection-engine-darwin)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:12 (11 by maintainers)
Top Results From Across the Web
Intermittent boot problem - Apple Community
The horizontal line goes to the end when I try to book my Macbook Pro running 10.11.x and then just stops. The only...
Read more >Intermittent permissions error in Word 365 for Mac
I'm finding I'm getting an intermittent permissions error in Word 365 (16.24) on MacOS Mojave (10.14.4). I'll generally be able to open and ......
Read more >How to troubleshoot intermittent Mac Bluetooth connections
Occasionally, Bluetooth problems arise. Here are the steps I recently followed troubleshooting intermittent connectivity issues on my Mac.
Read more >Intermittent initialization issues on macOS High Sierra #155
It mostly works fine, but intermittently I get a MidiInCore::initialize: error creating OS-X MIDI client object (-50) error and then I won't ...
Read more >MacOS Monterey Problems – Fixing Issues with macOS 12
Try running this application again.” If you see this error, try redownloading the installer and running it again. Note however if the Mac...
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

@pantharshit00 I think this is even unrelated to yarnpkg/yarn#7762, because the caching only doesn’t generate a new Client, but it shouldn’t delete a binary.
The problem here is really, that yarn sometimes deletes the artifacts we create. We have seen this before, also with the
yarn installthat you reported, but couldn’t reliably reproduce. I’m looking forward to the day when we get a reliable reproduction 🙂@Sytten Yarn has some postinstall caching issues which we have reported: https://github.com/yarnpkg/yarn/issues/7762
That results sometimes binary not being downloaded. They pointed us to yarn 2 release but that hasn’t seen much adoption.