Hey there, im having trouble with newer version of...
# mongodb
p
Hey there, im having trouble with newer version of the Mongo-URI... If I try to use for example "mongodb+srv://user:pass@xyz.mongodb.net/project" Prisma fails to connect with the error "Error creating a database connection. (An error occurred during DNS resolution: request timed out)", but if I try older version of the urls (provided by cloud mongo ui), for example "mongodb://user:pass@shard-00-00.xyz.mongodb.net:27017,shard-00-01.xyz.mongodb.net:27017,shard-00-02.xyz.mongodb.net/project" everything works fine. So basically
Copy code
<mongodb+srv://user:pass@xyz.mongodb.net/project>
does not work and
Copy code
<mongodb://user:pass@shard-00-00.xyz.mongodb.net:27017>,<http://shard-00-01.xyz.mongodb.net:27017,shard-00-02.xyz.mongodb.net/project|shard-00-01.xyz.mongodb.net:27017,shard-00-02.xyz.mongodb.net/project>
does
👀 1
n
Hey 👋 What’s your prisma version? I just tried MongoDB with prisma version
4.1.1
and it worked as expected. The connection string was of this format:
Copy code
<mongodb+srv://user:password@cluster0.souw3.mongodb.net/prisma>
p
Hey there, same here with the prisma version. I'm also running up-to-date node.js and npm (version v16.14.2 for node, 8.16.0 for npm)
n
Hi, apologies for the delay in follow-up, can you try with the LTS node version 16.16?