Describe the bug
When installing prisma via homebrew the post-deploy hook prisma generate fails because of a missing module.
To Reproduce
Follow the Get Started tutorial
After adding prisma generate as a post-deploy hook here is what my prisma.yml looks like...

Below is the output upon executing prisma deploy...

Expected behavior
When executing prisma generate on the command line, prisma successfully generates both the schema and the client in the generated directory. I would expect the same behavior when prisma generate is executed as a post-deploy hook.
Versions:
Postgres1.27.0prisma CLI: prisma/1.28.0 (darwin-x64) node-v10.4.1OS X Mojave 10.14.3prisma-client@RobertShaw1 : Did you install Prisma using brew or npm?
I installed Prisma using brew. This is mentioned at the very beginning of the issue.
@timsuchanek : What additional info is needed for this issue?
@RobertShaw1 : Thanks, this information is enough, I am able to reproduce. However, this would need more debugging from my end for a fix.
@divyenduz : Thanks. I just wanted to make sure the issue didn't get closed or marked as stale because there was additional info I needed to submit. Your efforts are much appreciated.
@RobertShaw1
Can you please try the new version(1.30) from homebrew?
@pantharshit00
I got the same error message as described above.

I confirm this is happening in 1.31.0 (version 1.31.1 wasn't available in brew when I checked for updates).
As a workaround, appending sh -c solves the issue:
endpoint: http://localhost:4466
datamodel: datamodel.prisma
hooks:
post-deploy:
- sh -c prisma generate
I checked output of which prisma from post-deploy hook and it's the same as running it outside: /usr/local/bin/prisma. I also tried to remove node_modules/package.json just to confirm, that the app doesn't load any local files, but the error persists.