Ok, I just can't get prisma studio, prism 3.12, to...
# mongodb
c
Ok, I just can't get prisma studio, prism 3.12, to connect to my local mongodb in my .env file, tried all of these DATABASE_URL="mongodb://foo:bar@localhost:27017/foo?authSource=admin" DATABASE_URL="mongodb://foo:bar@localhost:27017/foo" DATABASE_URL="mongodb+srv://foo:bar@localhost:27017/foo" And usually, you can just do DATABASE_URL="mongodb://localhost:27017/foo" which doesn't work either. I'm running prisma generate after each .env edit. Every time I get
Copy code
The provided database string is invalid. Unable to parse URL. in database URL.
Just a local instance of Mongod I use with express all of the time, just can't get Prisma to connect. Thanks for any suggestions.
Copy code
"@graphql-tools/schema": "^8.3.9",
    "@prisma/client": "^3.12.0",
    "cors": "^2.8.5",
    "dotenv": "^16.0.0",
    "express": "^4.17.3",
    "express-graphql": "^0.12.0",
    "graphql": "^15.3.0",
    "hs-client": "^0.0.10",
    "prisma": "^3.12.0",
    "ts-lint": "^4.5.1",
    "ts-node": "^10.7.0",
    "typescript": "^4.6.3"
j
Does
npx prisma db pull
work? What does your Prisma schema look like?
c
I got it working, just getting the local docker to create a valid replica set was harder than it seemed. Thx for replying.
👍 1
v
@Christopher Schaub maybe you could share information about local replica set? How your local connection string looks? Are you using docker compose?
c
I was able to get it working just fine
But thanks!
v
@Christopher Schaub That's cool, but could you tell how you made it? I can't understand how to run replica set locally and connect prisma to it