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.

prisma generate doesn't create client in default location

See original GitHub issue

Bug description

Following tutorial at the step npx prisma generate client doesn’t appear at the default .prisma/client location.

Only if I specify in prisma.schema:

generator client {
  provider = "prisma-client-js"
  output   = "client"
}

it generates client.

EDIT: still the new client doesn’t intellisense new schema. Still keeps the old user and posts:

image

EDIT2: New client is working after closing and reopening VSCode.

EDIT3: after changing schema and generating client, new client is not imported from @prisma/client . I have to import from ./prisma/client to have new client.

How to reproduce

Expected behavior

No response

Prisma information

Environment & setup

  • OS: Windows 10
  • Database: PostgreSQL
  • Node.js version: v16.13.1

Prisma Version

3.12.0

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tombohubcommented, Jun 1, 2022

I have tried again and all is normal. I think it’s my mistake. I thought the client is generated in root prisma folder, not in node_modules/.prisma folder. Thank you

0reactions
janpiocommented, May 30, 2022

Following that tutorial you should have a newer Prisma version, currently 3.14.0. Can you please try again and see if the error persists if you follow exactly the steps in the tutorial? Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Generating the client (Concepts)
By default, Prisma Client is generated into the node_modules/. prisma/client folder, but you can specify a custom location.
Read more >
node.js - @prisma/client did not initialize yet. Please run " ...
You forgot to copy the prisma directory, since generating the Prisma Client requires the schema.prisma file. You should copy the whole ...
Read more >
How to set up Next.js with Prisma and PlanetScale
generator client { provider = "prisma-client-js" previewFeatures ... Create a file in your API folder with a descriptive name.
Read more >
Prisma Access Known Issues
This traffic does not display in the logs by default. ... Delete the unsupported feature by creating a CLI session with the Panorama...
Read more >
Prisma Client Python
You can also define where the client will be generated to with the output option. By default Prisma Client Python will be generated...
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