Generate from `postinstall` hook is not working
See original GitHub issueBug description
Implicit generate from postinstall
hook is not working.
We figured this out because the CSB E2E test didn’t have an explicit generate and that E2E test was failing with
Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again
CSB test was fixed via https://github.com/prisma/e2e-tests/pull/848
How to reproduce
- Setup a Prisma project with
schema.prisma
- yarn/npm install Prisma client
- See logs for
postinstall
hook execution, the logs are dynamic and get removed by yarn, so you have to see it when it is happening - Write a script that uses the client (without manually running generate) and import client etc. It should not have been generated yet.
Expected behavior
Implicit generate should work.
Prisma information
2.9.0-dev.71
We understand that this broke in 2.9.0-dev.69
https://github.com/prisma/prisma/pull/3886 (not confirmed)
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Generate from postinstall hook is not working #5084 - GitHub
Write a script that uses the client (without manually running generate) and import client etc. It should not have been generated yet. Expected ......
Read more >Bowerrc post install hook not working - Stack Overflow
The simple reason is because you don't have any packages in your bower.json or all of the packages have been installed. Please have...
Read more >Lifecycle Scripts | Yarn - Package Manager
An overview of Yarn's supported lifecycle scripts.
Read more >Build lifecycle hooks - Expo Documentation
Learn how to use the EAS Build lifecycle hooks with npm to customize your build process.
Read more >Chart Hooks - KodeKloud
This simply defines a post-install hook that would create a Kubernetes Job to do something in our cluster after the helm install command ......
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
@divyenduz can this be closed maybe?
No, I’m not, I’m running
yarn
first. But don’t worry, I think my issue is different to this anyway.