arugaz / whatsapp-bot

Whatsapp Bot Multi Device - Node Js - Internationalization
GNU General Public License v3.0
596 stars 785 forks source link

Problem while setup prisma #493

Closed devilcoder01 closed 7 months ago

devilcoder01 commented 7 months ago

Description

When I setup prisma I all ready create a .env file in root file and fill the MONGODB_DB file with my mongodb url like this 

MONGODB_URL = "mongodb+srv://subhadipjana69:password@whatsbot.sabbinl.mongodb.net/?retryWrites=true&w=majority"

but when I run this command "npx prisma db push" it throw an erorr like this

Environment variables loaded from .env
Prisma schema loaded from prisma\schema.prisma
Error: Prisma schema validation - (get-config wasm)
Error code: P1012
error: Expected a string value, but received literal value `MONGODB_URL`.
  -->  schema.prisma:11
   | 
10 |   provider = "mongodb"
11 |   url      = env(MONGODB_URL)
   | 

Validation Error Count: 1
[Context: getConfig]

Prisma CLI Version : 5.6.0

Here told to give string value which I ready give in .env file but even It give me this.
So Fix this issu

Reproduction steps

1. Clone the repository & run the app
2. Closed & used saved credentials to log back in
3. Etc.

Screenshots

image

Logs

No response

Whatsapp Version

v2.23.23.78

OS

Windows

arugaz commented 7 months ago

the problem is on your mongodb url

rivai45 commented 7 months ago

Add your cluster before "?" mongodb+srv://subhadipjana69:password@whatsbot.sabbinl.mongodb.net/whatsbot?retryWrites=true&w=majority

github-actions[bot] commented 7 months ago

This issue is stale because it has been open 6 days with no activity. Remove the stale label or comment or this will be closed in 2 days