Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unmask prisma client not generated error #13

Merged
merged 3 commits into from
Nov 2, 2021

Conversation

omar-dulaimi
Copy link
Contributor

When running the project for the first time, with an empty prisma model, the generate command won't do anything at postinstall. So, when attempting to run the nestjs project locally, the following error occurs:

TypeError: Cannot read property 'PrismaClientKnownRequestError' of undefined

After the fix, the users can now see the original error:

ERROR [ExceptionHandler] @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues

Which is a lot better, to let the user know what happened and what to do.

@marcjulian
Copy link
Member

@omar-dulaimi thanks again for your contribution!

@marcjulian marcjulian merged commit fa4e10c into notiz-dev:main Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants