1st vs. repeated run experience of `prisma generate`
See original GitHub issueWhen starting out with Prisma, it’s helpful to provide more context to the users in CLI output. That CLI output becomes superfluous after a while.
One example is the prisma generate command which has this output:
[✔ Created `./package.json`]
[✔ Installed the `@prisma/client` package in your project]
✔ Generated Prisma Client to ./node_modules/@prisma/client in 1.48s
You can now start using Prisma Client in your code:
```
import { PrismaClient } from '@prisma/client'
// or const { PrismaClient } = require('@prisma/client')
const prisma = new PrismaClient()
```
Explore the full API: http://pris.ly/d/client
The helpful import snippet is probably not as valuable any more once you ran the command a few times. So we might want to think of a mechanism how to remove it for later invokations.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Generators (Reference) - Prisma
A generator determines which assets are created when you run the prisma generate command. The main property provider defines which Prisma Client (language ......
Read more >prisma2 generate output message always says You can now ...
prisma2 generate output message always says You can now start using Prisma ... 1st vs. repeated run experience of prisma generate #3390.
Read more >Start using Prisma in your existing database with ... - Medium
If you are a javascript or typescript developer, I think you've ... 1. Generate Prisma client from Prisma schema. npx prisma generate.
Read more >How Prisma Introspects a Schema from a MongoDB Database
As there is no SQL to modify the database structure (which is not written down or defined anywhere), Prisma also did not have...
Read more >repeated measures - GraphPad Prism 9 Statistics Guide
The repeat can be across time (eg. pre/post), across different conditions (eg. high and low temperature), or across space (eg. left knee and...
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 Free
Top 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

I think in the past, why we didn’t want to do that might be that
prisma generateis called onpostinstallso in this case you might never see this help message because the directory would already exists, before the user actually runs thegeneratecommand.To check and decide if we consider this a problem or not.
What about displaying it only when the client generation output directory did not previously exist and had to be created?
In that case, the message would only be displayed on initial installation (possible new user), if the output directory setting gets changed (therefore imports need to be updated), or if someone has deleted everything and is starting from scratch (something possibly went wrong with their configuration).
If the directory does exist, it’s a very good sign that the user has already set things up. Plus the default client import location is described in multiple places in the docs.