diff --git a/npm-packages/convex/src/cli/index.ts b/npm-packages/convex/src/cli/index.ts index be975bdc..0c6cad65 100644 --- a/npm-packages/convex/src/cli/index.ts +++ b/npm-packages/convex/src/cli/index.ts @@ -29,6 +29,7 @@ import inquirer from "inquirer"; import inquirerSearchList from "inquirer-search-list"; import { format } from "util"; import { functionSpec } from "./functionSpec.js"; +import dns from "node:dns"; const MINIMUM_MAJOR_VERSION = 16; const MINIMUM_MINOR_VERSION = 15; @@ -43,6 +44,9 @@ async function main() { // import * as SentryTracing from "@sentry/tracing" // Unused named imports are not guaranteed to patch the global hub. + // Use ipv4 first for 127.0.0.1 in tests + dns.setDefaultResultOrder("ipv4first"); + if (!process.env.CI && provisionHost === productionProvisionHost) { Sentry.init({ dsn: "https://f9fa0306e3d540079cf40ce8c2ad9644@o1192621.ingest.sentry.io/6390839",