ITADN

There is a 'phantom' cva package

#169Openphtdacosta 创建于 2025-12-09
P
phtdacostacommented
The docs show defineConfig imported from "cva" but don’t warn that pnpm add cva can install the placeholder name; you typically need `cva@beta` (for defineConfig) [npm](https://www.npmjs.com/package/cva/v/1.0.0-beta.4) or you must alias class-variance-authority as cva (official docs explain aliasing). [cva.style](https://cva.style/docs/getting-started/installation) The docs don’t clearly enforce that your copied components’ import paths (like @/registry/...) require you to create that folder structure or update all imports to wherever you placed cva.ts. The docs mention path aliases but the “why” matters: Vite alias fixes runtime bundling, tsconfig paths fixes editor + TS resolver. Missing either gives confusing errors. I am not sure how you can choose to fix this though, but this wrong/phantom `cva` package getting installed was a pain in the ass to figure out and fix.
0 条评论