Category: bug
When installing animate-ui components via add_component, the generated import paths inside the components don't match the actual file locations on disk.
Steps to reproduce:
- Run
add_component with @animate-ui/primitives-effects-fade
- The component is written to
src/<app>/ui/components/animate-ui/primitives-effects-fade.tsx
- Its dependencies are written to:
src/<app>/ui/hooks/hooks-use-is-in-view.ts
src/<app>/ui/components/animate-ui/primitives-animate-slot.tsx
The problem:
The imports inside primitives-effects-fade.tsx reference paths that don't exist:
import { useIsInView, ... } from '@/hooks/use-is-in-view';
// actual file: @/hooks/hooks-use-is-in-view
import { Slot, ... } from '@/components/animate-ui/primitives/animate/slot';
// actual file: @/components/animate-ui/primitives-animate-slot
This causes tsc to fail with TS2307 (Cannot find module) immediately after installation.
Workaround: Manually fix the imports:
import { useIsInView, ... } from '@/hooks/hooks-use-is-in-view';
import { Slot, ... } from '@/components/animate-ui/primitives-animate-slot';
It looks like the registry's original nested path structure (e.g. hooks/use-is-in-view, primitives/animate/slot) gets flattened to hyphenated filenames during installation, but the import statements inside the components aren't updated to match.
Metadata (auto-collected)
- apx version: 0.3.8
- OS: macos
- Arch: aarch64
Category: bug
When installing animate-ui components via
add_component, the generated import paths inside the components don't match the actual file locations on disk.Steps to reproduce:
add_componentwith@animate-ui/primitives-effects-fadesrc/<app>/ui/components/animate-ui/primitives-effects-fade.tsxsrc/<app>/ui/hooks/hooks-use-is-in-view.tssrc/<app>/ui/components/animate-ui/primitives-animate-slot.tsxThe problem:
The imports inside
primitives-effects-fade.tsxreference paths that don't exist:This causes
tscto fail with TS2307 (Cannot find module) immediately after installation.Workaround: Manually fix the imports:
It looks like the registry's original nested path structure (e.g.
hooks/use-is-in-view,primitives/animate/slot) gets flattened to hyphenated filenames during installation, but the import statements inside the components aren't updated to match.Metadata (auto-collected)