Skip to content

Fix/node version guard and fetch error unwrap#188

Open
riley0227 wants to merge 6 commits intodevfrom
fix/node-version-guard-and-fetch-error-unwrap
Open

Fix/node version guard and fetch error unwrap#188
riley0227 wants to merge 6 commits intodevfrom
fix/node-version-guard-and-fetch-error-unwrap

Conversation

@riley0227
Copy link
Copy Markdown
Contributor

Summary

What does this PR change?

Type

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Test
  • CI

Changes

Validation

How did you test this?

Checklist

  • Tests pass
  • Smoke tests pass
  • No raw errors introduced
  • CLI output follows Ix format

TannerTorrey3 and others added 6 commits April 8, 2026 23:58
Added a Discord link to the README.
Removed Homebrew installation instructions from README.
Fixes 6 Dependabot alerts (4 high, 2 moderate) caused by vulnerable
Vite versions pulled in transitively via vitest.

- ix-cli: overrides vite to >=7.3.2 <8.0.0 (was 7.3.1 via vitest 3.2.4)
- core-ingestion: overrides vite to 8.0.5 (was 8.0.0 via vitest 4.1.0)
- core-ingestion: pins @emnapi/core and @emnapi/runtime as devDeps to
  ensure cross-platform lock file compatibility (Linux CI vs Windows dev)
- ci: upgrades Node.js from 22.14 to 24 to match lock file environment

Co-authored-by: Joseph Mikhail <jsmikhai@ucsd.edu>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…causes

Users on Node 18 hit a bare "fetch failed" during ix map with no hint at
the underlying cause. Root causes: (1) no engines field or runtime check,
so install and startup succeed silently on EOL Node, and (2) ix map's
error handler printed err.message, discarding the real transport error
that undici stashes in err.cause.

- Add engines.node >=20 to ix-cli/package.json
- Add runtime Node major-version guard in ix-cli/src/cli/main.ts that
  exits early with an actionable message on Node <20
- Add formatFetchError in ix-cli/src/cli/errors.ts that unwraps err.cause
  for fetch TypeErrors, exposing codes like ECONNRESET / UND_ERR_SOCKET
- Use formatFetchError at both error sites in ix-cli/src/cli/commands/map.ts
- Document Node 20+ in README Requirements section
Node 18's bundled undici 5.x has a 300s headersTimeout default that
silently kills long-running fetch calls like /v1/map, causing the
reported "fetch failed" with no actionable detail. Node 20's undici 6.x
fixed this. Node 18 is also EOL as of April 2025.

The runtime guard in main.ts already enforces >=20, but the install
scripts, build script, setup script, and requirements.txt still allowed
18 — meaning users could install successfully on Node 18 only to hit
a cryptic failure at runtime.

Updated:
- scripts/install/install.sh (NODE_MIN_MAJOR)
- scripts/install/install.ps1 ($NodeMinMajor)
- scripts/build-cli.sh (version check + error message)
- scripts/dev/setup.sh (hint text)
- requirements.txt (node>=20, comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants