Giter Site home page Giter Site logo

Comments (4)

jmanhype avatar jmanhype commented on May 20, 2024 1

Environment variables loaded from .env
Prisma schema loaded from schema.prisma
Datasource "db": PostgreSQL database "dialoqbase", schema "public" at "postgres:5432"

Error: P1001: Can't reach database server at postgres:5432

Please make sure your database server is running at postgres:5432.
PS C:\Users\strau\dialoqbase\server\prisma>

from dialoqbase.

jmanhype avatar jmanhype commented on May 20, 2024 1

thank you for being up and working ive been tryin to get to work all night nothing is working right now I even tried to run my own postgres server but it wont allow me to run it in the docker file keeps saying is this server running.
when I user your settings I get this Invalid prisma.user.findFirst() invocation: The table public.User does not exist in the current database.

when I did on my own I Tried to The Prisma schema you've shared seems correct and the User model is defined. There could be a few reasons why you're still seeing the error message that the User table does not exist.

Here's a few possible reasons and their solutions:

  1. Database migration hasn't been run yet: Prisma doesn't automatically create tables in your database when you define models in the schema. It requires you to run a migration. If you haven't done that yet, here's how:

    npx prisma migrate dev --name init

    This command will create a new migration, and apply it to your database. The --name init is optional and gives the migration a name ("init" in this case).

  2. Database URL might be incorrect: Please ensure that the DATABASE_URL environment variable is pointing to the correct database. Check the .env file or wherever you're storing your environment variables.

  3. Wrong schema or database: If you're using Postgres and have multiple schemas or databases, ensure that you're using the right one. The default schema for Postgres is public.

If you've already run a migration and the table still isn't appearing, there might be an issue with the database connection or the migration itself. Check the output of the migration command for any error messages or warnings. Also, ensure you're looking at the right database and schema if you're inspecting the database manually.

from dialoqbase.

n4ze3m avatar n4ze3m commented on May 20, 2024 1

I have created a custom PostgreSQL image with an "init.sh" script that resolves the Windows installation bash error. I recommend pulling the latest repository and giving it another try. I apologize for not testing Docker on Windows myself.

from dialoqbase.

jmanhype avatar jmanhype commented on May 20, 2024 1

thank you very much its working 👯

from dialoqbase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.