Skip to content

fix(init): show actionable error when npx init can't load interactive UI#938

Draft
MathurAditya724 wants to merge 2 commits intomainfrom
issue-937-fix-interactive-ui
Draft

fix(init): show actionable error when npx init can't load interactive UI#938
MathurAditya724 wants to merge 2 commits intomainfrom
issue-937-fix-interactive-ui

Conversation

@MathurAditya724
Copy link
Copy Markdown
Member

When running npx sentry@latest init, the interactive wizard can't load because Ink requires the Bun binary. The old error — "The interactive UI failed to load" — was confusing and didn't explain what to do.

Now the error distinguishes between runtimes: on Node (npx), it tells users to install the native binary via curl -fsSL https://cli.sentry.dev/install | bash or use --yes for non-interactive mode. On Bun (where this shouldn't normally happen), it shows the simpler --yes hint.

Testing

bun test test/lib/init/wizard-runner.test.ts — 28 tests pass (2 new).

Fixes #937

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/_preview/pr-938/

Built to branch gh-pages at 2026-05-08 18:33 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Codecov Results 📊

6837 passed | Total: 6837 | Pass Rate: 100% | Execution Time: 0ms

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +1
Passed Tests 📈 +1
Failed Tests
Skipped Tests

All tests are passing successfully.

❌ Patch coverage is 50.00%. Project has 13917 uncovered lines.
✅ Project coverage is 77.04%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
src/lib/init/wizard-runner.ts 0.00% ⚠️ 1 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    77.03%    77.04%    +0.01%
==========================================
  Files          317       317         —
  Lines        60609     60608        -1
  Branches         0         0         —
==========================================
+ Hits         46684     46691        +7
- Misses       13925     13917        -8
- Partials         0         0         —

Generated by Codecov Action

@MathurAditya724 MathurAditya724 force-pushed the issue-937-fix-interactive-ui branch from a035217 to e247010 Compare May 8, 2026 18:27
Ship the pre-bundled ink-app.js sidecar in the npm package so
`npx sentry@latest init` gets the full interactive Ink UI on Node,
not just LoggingUI.

The text-import-plugin now emits a path string (not an external
require) for the `with { type: "file" }` import in CJS bundles.
`createInkUI` resolves it via import.meta.url and loads the
self-contained ESM sidecar via dynamic import(). The factory no
longer gates on isBunRuntime() — Ink works on both runtimes.

Fixes #937
@MathurAditya724 MathurAditya724 force-pushed the issue-937-fix-interactive-ui branch from e247010 to a46cca8 Compare May 8, 2026 18:31
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.

npx sentry@latest init fails to load interactive UI

1 participant