Skip to content

Can't reach database server at localhost:`3306 - Prisma #193

Open
@ghost

Description

Describe the Bug (버그 설명)

When adding new user the request is failing with error message:

{
  "message": "\nInvalid `this.users.findUnique()` invocation in\n/app/src/services/users.service.ts:27:45\n\n  24 public async createUser(userData: CreateUserDto): Promise<User> {\n  25   if (isEmpty(userData)) throw new HttpException(400, \"userData is empty\");\n  26 \n→ 27   const findUser: User = await this.users.findUnique(\nCan't reach database server at `localhost`:`3306`\n\nPlease make sure your database server is running at `localhost`:`3306`."
}

Version to Reproduce (현재 사용한 버전)

v9.1.1

Steps to Reproduce (재현 순서)

  1. npx typescript-express-starter "demo"
  2. rename .env.test.local to .env (without this, the step third step is failing with Environment variable not found: DATABASE_URL)
  3. run npm run prisma:migrate
  4. Replaced mysql image with image: arm64v8/mysql (I'm using M1 Pro Mac)
  5. run docker-compose up -d
  6. add user via swagger docs
  7. see error

Expected Behavior (예상 동작)

Used should be added successfully

Actual Behavior (실제 동작)

Request if failing

Metadata

Metadata

Assignees

Labels

🐞 BugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions