Closed Jamior closed 2 years ago
Is there any errors in the log? Try prisma db seed
?
The postgres container doesnt recognise the command
Can you send the logs here?
_void_postgres_1_logs.txt Thats the postgres logs
Try prisma migrate deploy
. Are you using Docker?
Yes sir
Execute prisma migrate deploy
?
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
Ah, yarn binaries are not exported. Try yarn prisma
instead of prisma
.
Try deleting the image and then recreate it? Both void and postgres. Or use Docker Compose as an easier alternative.
i made both of these images with docker compose
Try recreating these images or use node
and yarn
instead.
Reopen if you are still encounter this issue.
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.
Can you access the container and then execute prisma migrate deploy && prisma db seed
?
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.
Can you try appending yarn
or npx
before prisma
? One of them should be present in the void container.
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.
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>
.
Actually its only needed when executing prisma
standalone.
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
Can you try the latest commit in the dev
branch? Create a new issue if it does not work.
When using docker-compose _void_postgres_1_logs.txt
Brand New.
Credentials tested: Admin voiduser
admin voiduser
void voiduser
Void Voiduser