When I have the prisma client in a custom location...
# orm-help
j
When I have the prisma client in a custom location
db/generated/client
, prisma works fine. However, when I try to keep the client in its default location in
node_modules
, I get this error:
Copy code
(node:56637) UnhandledPromiseRejectionWarning: Error: Unable to load Node-API Library from node_modules/.prisma/client/libquery_engine-darwin.dylib.node, Library may be corrupt
Any thoughts? The only related thing I can find online (unsupported node version), and in this slack thread (prisma not supported in M1) seem unrelated, as I'm using Node v 12.16.0 on a MacBook Pro, with Prisma v3.9.1 (and the client works fine when in a different location). Anyone able to help me understand whats happening?
Details, in case its helpful : OS:
Copy code
MacOS Big Sur, version 11.6
Model Name:	MacBook Pro
Model Identifier:	MacBookPro15,1
Application:
Copy code
"@prisma/client": "3.9.1",
"prisma": "3.9.1"

Node v12.16.0
yarn v1.22.0
prisma.schema:
Copy code
generator client {
  provider      = "prisma-client-js"
  binaryTargets = ["native"]
}

datasource db {
  provider = "postgresql"
}
a
Hey Jacob 👋! This looks like a strange one. Have you tried wiping your
node_modules
and re-running
npm install
? If you get the same error, opening a bug report with this info would be your best bet 👍.
j
Yes I have. One further thing to note is that this application is in a shared npm workspace. I'll try to file a bug report today, thanks!
🤞 1