Skip to content

setup: dev tooling SIGSEGV on Node 22 (arm64 SWC) — pin Node version #17

Description

@mollybeach

Context

Building/testing locally, next build and vitest crash with SIGSEGV (exit 139) under Node v22.20.0 on Apple Silicon. The @next/swc-darwin-arm64@14.2.33 native binary segfaults when loaded by Node 22; the same commands succeed under Node v24.10.0.

A related failure mode: a broken/partial pnpm install can leave the SWC .node binary missing, so next build logs Downloading swc package @next/swc-darwin-arm64… and then crashes with SIGSEGV.

Problem

There is no pinned Node version, so contributors and CI on Node 22 hit a hard-to-diagnose native crash. Build/test reliability silently depends on whichever Node the developer happens to run.

Tasks

  • Add .nvmrc (e.g. 24) and align engines.node in package.json (currently >=20).
  • Document the Node requirement and the "Downloading swc … SIGSEGV" troubleshooting (recover with pnpm install --force) in the README.
  • Ensure the CI pipeline (ci: add GitHub Actions pipeline (lint, typecheck, test, build) #9) runs on the pinned Node version.

Acceptance criteria

  • pnpm build, pnpm test, and pnpm typecheck pass on the pinned Node in a clean clone.
  • .nvmrc and engines.node agree; CI uses the same version.

Affected files

package.json, .nvmrc (new), README.md, .github/workflows/* (new)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsetupProject / env configuration

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions