Troubleshooting
Start with the repository's locked toolchain and the hst diagnostic commands.
Avoid installing a second global copy of Hosanna Tools.
Verify the Environment
node --version
npx hst version
npm ls @tantawowa/hosanna-ui @tantawowa/hosanna-tools @tantawowa/hsc
npx hst doctor
npx hst compiler:status
doctor checks the compiler and returns a failing status if it is missing or
mismatched. Run npx hst doctor --fix to repair supported installation
problems. Compiler repair uses the project manifest and lockfile rather than
selecting the newest release.
Current hosanna-samples expects Node.js 24.17.0. In another application,
use its .nvmrc and package.json engines instead of copying that version
blindly.
Generated Imports Cannot Be Resolved
Generated factories and state contracts live below src-generated and are
normally ignored by Git. Generate them before direct TypeScript or Vitest
commands:
npm run generate
The sample repository's normal npm test, npm run build, and hst run
workflows generate them automatically.
Dev Port Is Occupied
The active Vite port comes from .hosanna-tools/run.json or --vitePort. The
sample repository uses 5170; HST's built-in default is 5173.
First, inspect the owning process:
lsof -nP -iTCP:5170 -sTCP:LISTEN
Stop the relevant dev session normally. For a separate run, choose a complete non-conflicting port configuration rather than force-killing an unknown process:
npx hst run browser dev emulator --vitePort 5190
Browser Opens the Wrong or Stale Screen
- Run from the application repository root.
- Inspect
.hosanna-tools/run.jsonfor the selected app, port, and default profile. - Use
--dry-run --explainto see how HST resolved the launch. - Check launch query parameters such as
defaultSpringboardRigandnoAutoOpenLastScreen.
npx hst run browser dev emulator --dry-run --explain
The framework package is @tantawowa/hosanna-ui. Its source links and generated
types are prepared by HST. Installing React or unrelated @types packages does
not repair missing framework links or generated source.
Roku Shows an Old Runtime
Confirm the selected Roku, then rebuild and install through the application's
checked-in script, such as npm run roku:run:dev in Samples. If logs refer to
an unexpected runtime, check the device address, package output, and build
configuration before changing framework bootstrap code.
Focus or Input Does Nothing
- Give the intended starting control
.isInitialFocus(). - Verify every explicit
nextFocusMapID exists in the current view tree. - Click the dark browser background before using remote-style keyboard input; browser-native inputs intentionally keep their own key events.
- On device, inspect the focus hierarchy and input path with Hosanna diagnostics instead of inferring focus from pixels alone.
Framework Source or Compiler Cannot Install
- Run
npm ls @tantawowa/hosanna-ui @tantawowa/hosanna-tools @tantawowa/hscto check the npm installation, thennpx hst doctorto inspect framework integration. - In a migrated app, run
npm ciandnpx hst sdk:installto restore the locked packages, including the platform compiler, and framework source links. No compiler key is required. - If diagnostics report legacy source settings or an old SDK directory, follow
Upgrading. Save local framework
changes before running
npx hst sdk:migrate --replace-existing. - Check all three toolchain dependencies in
package.jsonandpackage-lock.json. Use Tools 5.1.1 or newer for npm compiler resolution and doctor repair. Keep npm optional dependencies enabled. - For an older application, add
@tantawowa/hscusing the compiler setup guide.hosanna.jsonis optional legacy configuration, not a requirement for npm applications.
See Compiler and Tool Setup and Upgrading.