Skip to content
WANCRAFT

Troubleshooting

Fixes for the most common integration problems.

Module not found: 'motion/react'

The component depends on Motion. Install it:

npm install motion

If you previously used framer-motion, that is fine — both can coexist, but Wancraft files import from motion/react.

The component renders without styles

Tailwind must scan the folder the file lives in. Tailwind v4 detects sources automatically, but files outside your project root or in ignored folders are skipped. Register the folder explicitly:

app/globals.css
@import "tailwindcss";
@source "../components";

Dark styles do not apply (or always apply)

Components use the dark: variant. Make sure it matches how your app toggles themes — see Theming.

“useState only works in Client Components”

Keep the "use client" directive at the very top of the copied file. Some editors move comments above it when formatting; the directive must be the first statement.

shadcn add fails

  • Run npx shadcn@latest init first — the CLI needs components.json.
  • Check the URL ends in .json and the slug matches the component page URL.
  • Behind a proxy, download the JSON and use the copy-and-paste method instead.

Nothing animates

Your operating system may have reduced motion enabled — the components are respecting it. This is intended behaviour; check the setting before debugging further.