Facing this issue for the last 2 days, tried every possible solution e.g reset cache, flushing dns, and everything that could reset ports, reinstalled VScode but nothing seems to work 1
The same connection string works when connecting without using prisma client 2
Here is the connection string in .env file
DATABASE_URL="mongodb+srv://alpha:[email protected]/testing"
Even works with another project in which I am not using prisma 3
When trying to introspect, its giving this error! 4
2
Answers
you are working with prisma in .env file format of DATABASE_URL should be like this if using mongodb Atlas ** follow the steps:
1.in database choose connect the select "connect to application"
2.copy the url and past it as ** DATABASE_URL in .env file for example
3.remove everything after mongodb.net / and replace by your database name like below
Check your DATABASE_URL in your .env file and make sure your database url is not inside a " ". if it is, remove the " at both sides.