Error executing commit

未关闭
#186 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
30/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
nodejs, postgresql, typescript
领域
cli, databases

调研方向

使用 pnpm exec graphile-migrate commit 重现,并将其与报告中的 watch --once 命令进行比较。从 graphile-migrate/dist/pgReal.js 和 graphile-migrate/dist/commands/commit.js 中的连接设置和堆栈帧开始;当 commit 能够解析配置的数据库主机,而不是返回 ENOTFOUND 时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Summary

I got this error:

Error: getaddrinfo ENOTFOUND base
    at /Users/anton/WebstormProjects/photo-site/node_modules/.pnpm/[email protected][email protected]/node_modules/pg-pool/index.js:45:11
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.withClient (/Users/anton/WebstormProjects/photo-site/node_modules/.pnpm/[email protected]/node_modules/graphile-migrate/dist/pgReal.js:73:26)
    at async Object._reset (/Users/anton/WebstormProjects/photo-site/node_modules/.pnpm/[email protected]/node_modules/graphile-migrate/dist/commands/reset.js:16:5)
    at async _commit (/Users/anton/WebstormProjects/photo-site/node_modules/.pnpm/[email protected]/node_modules/graphile-migrate/dist/commands/commit.js:56:5)
    at async handler (/Users/anton/WebstormProjects/photo-site/node_modules/.pnpm/[email protected]/node_modules/graphile-migrate/dist/commands/commit.js:97:9)
    at async Object.newHandler [as handler] (/Users/anton/WebstormProjects/photo-site/node_modules/.pnpm/[email protected]/node_modules/graphile-migrate/dist/cli.js:22:20) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'base'
}

watch works just fine

pnpm exec graphile-migrate watch --once
graphile-migrate: Up to date — no committed migrations to run
[2023-06-26T16:11:14.212Z]: Running current.sql
[2023-06-26T16:11:14.219Z]: current.sql unchanged, skipping migration
[2023-06-26T16:11:14.221Z]: Finished (7ms)

I'm running pnpm

 "graphile-migrate": "^1.4.1"

posgres is running with docker:

  db:
    image: postgres:15.3-alpine
    restart: always
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
      POSTGRES_DB: app
    ports:
      - 5500:5432

config:

  "connectionString": "postgres://postgres:postgres@localhost:5500/app",
  "shadowConnectionString": "postgres://postgres:postgres@localhost:5500/app_shadow",

nodejs: 20.3.1, 18.16.1

主要语言
TypeScript
星标
836
派生
71
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

graphile/migrate 的其他 Issue

查看 graphile/migrate 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。