Error executing commit

オープン
#186 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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 はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

graphile/migrate のほかの issue

graphile/migrate の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。