[BUG] [PRISMA STUDIO] [PRISMA GENERATE] #23806
Replies: 4 comments 3 replies
-
Hi @nathanmota-dev 👋 Thank you for raising this question. The error message indicates that the database name in your connection string is empty. Prisma Client requires a database name to be specified in the connection string to connect and interact with the database.
Replace |
Beta Was this translation helpful? Give feedback.
-
The error I am experiencing is not with the connection string; the connection string is correct because I tested it using Atlas Compass. Additionally, I conducted another backend test using Mongoose instead of Prisma and did not encounter any problems, so the error is not with the connection string but rather with Prisma. It seems as though the command 'npx prisma generate' is not working. I have also tried uninstalling and reinstalling Prisma and prisma/client dependencies, but it didn't help; the error persists. |
Beta Was this translation helpful? Give feedback.
-
I think I've seen this bug before. Before the error occurred, did you make a change to the DB schema with prisma studio still running? |
Beta Was this translation helpful? Give feedback.
-
I think I did the same thing, do you know how to fix it? I even uninstalled the dependencies and installed them again but it didn't solve the problem. |
Beta Was this translation helpful? Give feedback.
-
Bug description
Message: Error in Prisma Client request:
How to reproduce
Quando eu rodo o comando: npx prisma studio, me acusa o erro sendo que, ao executar anteriormente o comando npx prisma generate ele fala que tudo ocorreu bem, então não era pra isso ter acontecido. Conforme abaixo:
npx prisma generate
Environment variables loaded from .env
Prisma schema loaded from prisma\schema.prisma
✔ Generated Prisma Client (v5.12.1) to .\node_modules@prisma\client in 127ms
Start using Prisma Client in Node.js (See: https://pris.ly/d/client)
or start using Prisma Client at the edge (See: https://pris.ly/d/accelerate)
See other ways of importing Prisma Client: http://pris.ly/d/importing-client
┌────────────────────────────────────────────────────────────────┐
│ Supercharge your Prisma Client with global database caching, │
│ scalable connection pooling and real-time database events. │
│ Explore Prisma Accelerate: https://pris.ly/cli/-accelerate │
│ Explore Prisma Pulse: https://pris.ly/cli/-pulse
Expected behavior
O comportamento esperado era que houvesse conexão com banco de dados MongoDb, onde apesar de falar que quando foi executado npx prisma generate ocorreu tudo bem quando eu acesso o bd não vejo nenhum esquema criado, fora que o studio prisma me da o erro. eu não consigo fazer minhas solicitações POST.
A string de conexão esta correta porque testei usando MongoDB Compass
Prisma information
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
Environment & setup
Prisma Version
prisma: 5.12.1
Beta Was this translation helpful? Give feedback.
All reactions