-
Notifications
You must be signed in to change notification settings - Fork 880
Description
Bug description
HI, Im integrating prisma & mongodb and got a problem when following the documentation here, for more developer friendly experience doc, it would be helpful to update it, see the image included for how
How to reproduce
- Go to Doc guide for set up prisma + mognodb, here
- Follow the step-by-step guide for integrating Prisma into your project.
- Start by creating a basic database cluster on MongoDB.
- Access the Atlas dashboard for MongoDB management.
- Navigate to the 'Database' tab.
- Establish a connection to the database using the provided drivers.
- Incorporate the database connection string into your application's code.
Note that MongoDB Atlas generates an environment link which, crucially, lacks the database name. generate env link without the Database name- Commonly, users copy the provided MongoDB environment key directly into their project's .env file, assuming it is complete.
- The error message displayed is: "
Error:
Invalid prisma.blog.findMany() invocation: Raw query failed. Code: unknown. Message: Kind: Command failed: Error code 8000 (AtlasError): empty database name not allowed.
Expected behavior
To enhance the developer-friendly aspect of prisma documentation, it would be beneficial to add a concise, highlighted notice, perhaps with an exclamation mark, advising developers to include the database name when copying the environment variable for the MongoDB URL link. This addition would significantly improve the clarity and usability of prisma documentation, see image for where the information could be placed:

Prisma information
datasource db {
provider = "mongodb"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
}
...
Environment & setup
- OS: Windows, win32, x64
- Database: MongoDB
- Node.js version: v18.18.2
Prisma Version
Prsima: 5.7.1