Coder Social home page Coder Social logo

Comments (23)

AlphaNecron avatar AlphaNecron commented on July 3, 2024

Is there any errors in the log? Try prisma db seed?

from void.

Jamior avatar Jamior commented on July 3, 2024

The postgres container doesnt recognise the command

from void.

AlphaNecron avatar AlphaNecron commented on July 3, 2024

Can you send the logs here?

from void.

Jamior avatar Jamior commented on July 3, 2024

_void_postgres_1_logs.txt
Thats the postgres logs

from void.

AlphaNecron avatar AlphaNecron commented on July 3, 2024

Try prisma migrate deploy. Are you using Docker?

from void.

Jamior avatar Jamior commented on July 3, 2024

Yes sir

from void.

AlphaNecron avatar AlphaNecron commented on July 3, 2024

Execute prisma migrate deploy?

from void.

Jamior avatar Jamior commented on July 3, 2024

root@vmi933925://root/Void# docker exec -it void_postgres_1 prisma migrate deploy
OCI runtime exec failed: exec failed: unable to start container process: exec: "prisma": executable file not found in $PATH: unknown

from void.

AlphaNecron avatar AlphaNecron commented on July 3, 2024

Ah, yarn binaries are not exported. Try yarn prisma instead of prisma.

from void.

Jamior avatar Jamior commented on July 3, 2024

image

from void.

AlphaNecron avatar AlphaNecron commented on July 3, 2024

Try deleting the image and then recreate it? Both void and postgres. Or use Docker Compose as an easier alternative.

from void.

Jamior avatar Jamior commented on July 3, 2024

i made both of these images with docker compose

from void.

AlphaNecron avatar AlphaNecron commented on July 3, 2024

Try recreating these images or use node and yarn instead.

from void.

AlphaNecron avatar AlphaNecron commented on July 3, 2024

Reopen if you are still encounter this issue.

from void.

roib20 avatar roib20 commented on July 3, 2024

I'm getting the same issue through a Docker Compose deployment. When attempting to login an error message comes up: "User not found".

Tested on v0 and /dev branches.

from void.

AlphaNecron avatar AlphaNecron commented on July 3, 2024

Can you access the container and then execute prisma migrate deploy && prisma db seed?

from void.

roib20 avatar roib20 commented on July 3, 2024

Do you mean in the postgres container or the main void container? I tried running commands in both, but I am getting the same errors as Jamior. prisma and yarn commands are not found in the container shells. I'm using the official postgres container as mentioned in the docker-compose example; I don't think it includes prisma.

from void.

AlphaNecron avatar AlphaNecron commented on July 3, 2024

Can you try appending yarn or npx before prisma? One of them should be present in the void container.

from void.

n3rd3x3 avatar n3rd3x3 commented on July 3, 2024

getting error: Environment variable not found: DATABASE_URL. when running prisma db seed. config.toml does have postgres url included
(same issue as users above)

Full log:

yarn run v1.22.19
$ /void/node_modules/.bin/prisma db seed
Running seed command `ts-node --compiler-options {"module":"commonjs"} prisma/seed.ts` ...
PrismaClientInitializationError: 
Invalid `prisma.user.count()` invocation:


  error: Environment variable not found: DATABASE_URL.
  -->  schema.prisma:3
   | 
 2 |   provider = "postgresql"
 3 |   url      = env("DATABASE_URL")
   | 

Validation Error Count: 1
    at Object.request (/void/node_modules/@prisma/client/runtime/index.js:39815:15)
    at async PrismaClient._request (/void/node_modules/@prisma/client/runtime/index.js:40637:18)
    at async main (/void/prisma/seed.ts:8:17) {
  clientVersion: '3.10.0',
  errorCode: undefined
}

An error occured while running the seed command:
Error: Command failed with exit code 1: ts-node --compiler-options {"module":"commonjs"} prisma/seed.ts
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

from void.

n3rd3x3 avatar n3rd3x3 commented on July 3, 2024

Update: temporary solution to this before it is fixed is to put your postgres URI as an environment variable when creating the docker container like-e DATABASE_URL=<url goes here>.

from void.

AlphaNecron avatar AlphaNecron commented on July 3, 2024

Actually its only needed when executing prisma standalone.

from void.

Dumdidldum avatar Dumdidldum commented on July 3, 2024

hi, i am having the same issue,
i am using the docker compose file from the repo and the void container prints this:

┌─────────────────────────────────────────────────────────┐
│  Update available 3.10.0 -> 4.2.1                       │
│                                                         │
│  This is a major update - please follow the guide at    │
│  https://pris.ly/d/major-version-upgrade                │
│                                                         │
│  Run the following to update                            │
│    yarn add --dev prisma@latest                         │
│    yarn add @prisma/client@latest                       │
└─────────────────────────────────────────────────────────┘

error Command failed with exit code 1.

and then the default credentials also don't work/exist

running /void/node_modules/.bin/prisma db seed results in this:

Running seed command `ts-node --compiler-options {"module":"commonjs"} prisma/seed.ts` ...

An error occured while running the seed command:
Error: Command failed with ENOENT: ts-node --compiler-options {"module":"commonjs"} prisma/seed.ts
spawn ts-node ENOENT

from void.

AlphaNecron avatar AlphaNecron commented on July 3, 2024

Can you try the latest commit in the dev branch? Create a new issue if it does not work.

from void.

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.