Skip to content

[Bug]: macOS installer fails — apps/desktop tsc -b cannot resolve @testing-library/dom re-exports #36980

@vladkvlchk

Description

@vladkvlchk

Summary

The macOS bootstrap installer (Hermes Setup) fails on a clean install with INSTALL DIDN'T FINISH (exit code 1) during the desktop stage. tsc -b fails because @testing-library/dom — a peerDependency of @testing-library/react@^16 and the actual source of waitFor, fireEvent, screen, within — is not declared anywhere in the workspace, so npm does not install it and TypeScript cannot resolve the re-exports.

Reproduce

  1. Download and run the macOS Hermes Setup installer on a clean machine (or wipe ~/.hermes/hermes-agent).
  2. The window shows INSTALL DIDN'T FINISH with exit code 1. Log: ~/.hermes/logs/bootstrap-installer.log.

Symptom (from bootstrap-installer.log)

stage=desktop  src/lib/external-link.test.tsx(1,19): error TS2305: Module '"@testing-library/react"' has no exported member 'fireEvent'.
stage=desktop  src/lib/external-link.test.tsx(1,38): error TS2305: Module '"@testing-library/react"' has no exported member 'screen'.
stage=desktop  src/lib/external-link.test.tsx(1,46): error TS2305: Module '"@testing-library/react"' has no exported member 'waitFor'.
... (~20 similar errors across apps/desktop/src/**/*.test.{ts,tsx})
stage=desktop  npm error Lifecycle script `build` failed with error:
stage=desktop  npm error code 1
stage=desktop  npm error path /Users/<user>/.hermes/hermes-agent/apps/desktop
stage=desktop  npm error workspace hermes@0.15.1
stage=desktop  npm error command sh -c node scripts/assert-root-install.cjs && ... && tsc -b && vite build
✗ Desktop app build failed
{"ok":false,"stage":"desktop","skipped":false,"reason":"exit code 1"}
ERROR hermes_bootstrap_lib::bootstrap: bootstrap FAILED stage=Some("desktop") error=exit code 1

Root cause

  • apps/desktop/package.json declares @testing-library/react@^16.3.2.
  • @testing-library/react@16 declares @testing-library/dom: ^10.0.0 as a peerDependency (not auto-installed by npm).
  • Neither root package.json nor apps/desktop/package.json declares @testing-library/dom as a direct dep, so the package is absent from node_modules.
  • @testing-library/react/types/index.d.ts does export * from '@testing-library/dom'. Without the dom package present, TypeScript cannot resolve the re-exports → every test file that imports waitFor / fireEvent / screen / within from @testing-library/react fails with TS2305.

Verified on installer-pinned commit f106e58afa98 and current main (b9646276) — both still missing @testing-library/dom.

Workaround (manual)

cd ~/.hermes/hermes-agent
npm install -D @testing-library/dom@^10 --workspace=apps/desktop
cd apps/desktop && npm run pack

Then re-launch Hermes Setup → Retry install.

Affected

All macOS users running the bootstrap installer on the current pinned commit. The desktop stage runs unconditionally, so the installer cannot complete.

Fix

PR: #36978 — declares @testing-library/dom@^10.4.0 as an explicit devDependency in apps/desktop/package.json.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existsarea/configConfig system, migrations, profilestype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions