The usePiperTts hook imported a non-existent 'tts' namespace from
@mintplex-labs/piper-tts-web@1.0.4. The package exports named
functions (stored, download, predict, etc.) at the top level, not
under a tts namespace. The failing named-import threw at module-link
time, which crashed the lazy chunk for PersonalAssistant.tsx and
left /NEX/assistant blank with only a React error boundary fallback.
Two fixes in one file:
1. Import as namespace:
import * as tts from "@mintplex-labs/piper-tts-web"
ESM namespace imports synthesize a 'tts' object whose members are
the package's named exports, so the existing tts.stored() /
tts.download() / tts.predict() call sites bind to real functions
without touching the hook body.
2. Wrap predict() Blob result in URL.createObjectURL() before passing
to new Audio(). predict() returns Promise<Blob>, not a URL string,
and Audio() cannot accept a Blob directly. Added a shared cleanup
callback that revokes the object URL on onended/onerror and in the
catch path so we don't leak blob URLs on every speak invocation.
Bug 1 was the page-blanking crash at module load. Bug 2 was a latent
runtime crash behind the speak button click handler, surfaced while
the file was already being edited.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| components.json | ||
| index.html | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| vite.config.ts | ||
| vitest.config.ts | ||
@paperclipai/ui
Published static assets for the Paperclip board UI.
What gets published
The npm package contains the production build under dist/. It does not ship the UI source tree or workspace-only dependencies.
Typical use
Install the package, then serve or copy the built files from node_modules/@paperclipai/ui/dist.