Postinstall hook throws Prisma error when using pnpm: Command failed with exit code 1: npm install -D prisma@latest
See original GitHub issue- Use pnpm for dependency management.
- Run
keystone postinstall
Expected behaviour: Postinstall completes
Actual:
Error thrown when trying to install Prisma, see below screenshot (it’s for postinstall --fix
but the same thing happens with postinstall
):
This seems like it’s probably an issue with the dependency file structure of pnpm. No such error happens with npm, or when forcing a flat node_modules structure by using pnpm i --shamefully-hoist
.
It’s not clear to me whether this is an issue on the Prisma side or on the Keystone side. Please let me know if it needs to be reported elsewhere.
Node version 18.3
Issue Analytics
- State:
- Created a year ago
- Comments:15 (10 by maintainers)
Top Results From Across the Web
prisma - npm
Prisma is an open-source database toolkit. It includes a JavaScript/TypeScript ORM for Node.js, migrations and a modern GUI to view and edit ...
Read more >Can't find '@prisma/client' after deploying, but it works on dev
I've managed to get this to work on netlify dev locally, and also to build it online. But when I try to fetch...
Read more >NextJS - TailwindCSS - Supabase - Prisma | EdAnisko.com
I'm going to run with that and hook it up to a SQL backend. ... pnpm install -D tailwindcss postcss autoprefixer pnpx tailwindcss...
Read more >shadcn on Twitter: "OK @prisma I give up! I've tried everything ...
Hey Nikolas, this is the error I'm seeing when deployed to Vercel. Works fine on local. I found a related GitHub issue: https://github.com/prisma/prisma/issues/ ......
Read more >“yarn upgrade-interactive certain packages” Code Answer's
You've to install the interactive-tools plugin first. $ yarn plugin import interactive-tools $ yarn upgrade-interactive Press <up>/<down> to select packages ...
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 FreeTop 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
Top GitHub Comments
To be more specific I had to list:
react
@babel/runtime
@prisma/client
prisma
@types/react
@types/node
That at least makes all keystone commands succeed and the GraphQL API works as expected. BUT when trying to access the keystone admin UI I am stuck with the error:
Hi @isla-nye Thanks for posting, we are exploring how we might better support
pnpm
for package management, currently you can listprisma
and@prisma/client
in your dependencies OR as you suggest usepnpm i --shamefully-hoist
. Thanks