question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

docs: prisma generate post install

See original GitHub issue

The docs at https://github.com/prisma/docs/blob/main/content/100-getting-started/02-setup-prisma/100-start-from-scratch/120-mongodb/200-install-prisma-client.mdx states that prisma generate is automatically run after running npm install @primsa/client.

I ran the npm command using both Node v16.x and v18.x and with neither was prisma generate automatically run afterward. I do have a schema file at prisma/schema.prisma.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
janpiocommented, Jun 30, 2022

I am not sure what there is to update, but of course a PR would make that clear - so go ahead and link to it here.

1reaction
janpiocommented, Jun 28, 2022

npm does not output postinstall script’s output any more since a few versions. If you start with an empty project (but a schema.prisma file) and then isntall prisma and @prisma/client you should have a generated Client in node_modules/.prisma/client which indicates that prisma generate was indeed run under the hood.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Generating the client (Concepts) - Prisma
The @prisma/client package defines its own postinstall hook that's being executed whenever the package is being installed. This hook invokes the prisma generate...
Read more >
How to run `prisma generate` in production? - Stack Overflow
Postinstall hook The package.json uses the postinstall hook script to run prisma generate. Typically this would go in the build step.
Read more >
How to Build a Fullstack App with Next.js, Prisma, and ... - Vercel
create () or retrieve all the Post records from the database with prisma.post.findMany() . For an overview of the full Prisma Client API,...
Read more >
Command Line Interface | RedwoodJS Docs
Running yarn redwood build without any arguments generates the Prisma ... Check the post-install instructions for one change you need to make to...
Read more >
@prisma/client - npm
Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found