nextjs-subscription-payments icon indicating copy to clipboard operation
nextjs-subscription-payments copied to clipboard

Can't import shadcn button component

Open belugawhale3 opened this issue 4 months ago • 1 comments

I tried running npx shadcn-ui@latest add button in Vscode on windows to get the shadcn button component and was thrown this error: Command failed with exit code 1: pnpm add @radix-ui/react-slot  WARN  Moving @types/node that was installed by a different package manager to "node_modules/.ignored"  WARN  Moving @types/react that was installed by a different package manager to "node_modules/.ignored"  WARN  Moving autoprefixer that was installed by a different package manager to "node_modules/.ignored"  WARN  Moving eslint that was installed by a different package manager to "node_modules/.ignored"  WARN  Moving eslint-config-next that was installed by a different package manager to "node_modules/.ignored"
 WARN  Moving eslint-config-prettier that was installed by a different package manager to "node_modules/.ignored"  WARN  Moving eslint-plugin-react that was installed by a different package manager to "node_modules/.ignored"
 WARN  Moving eslint-plugin-tailwindcss that was installed by a different package manager to "node_modules/.ignored"  WARN  Moving postcss that was installed by a different package manager to "node_modules/.ignored"  WARN  Moving prettier that was installed by a different package manager to "node_modules/.ignored"  WARN  Moving prettier-plugin-tailwindcss that was installed by a different package manager to "node_modules/.ignored"  WARN  Moving supabase that was installed by a different package manager to "node_modules/.ignored"  WARN  Moving typescript that was installed by a different package manager to "node_modules/.ignored"  WARN  Moving @radix-ui/react-toast that was installed by a different package manager to "node_modules/.ignored" WARN  Moving @stripe/stripe-js that was installed by a different package manager to "node_modules/.ignored"
 WARN  Moving @supabase/ssr that was installed by a different package manager to "node_modules/.ignored"
 WARN  Moving @supabase/supabase-js that was installed by a different package manager to "node_modules/.ignored"

Using windows currently. Any help?

belugawhale3 avatar Feb 23 '24 04:02 belugawhale3

Looks like the problem may be that you're mixing package managers. Delete the npm lock file and the node_modules folder and try reinstalling all dependencies with pnpm.

chriscarrollsmith avatar Feb 26 '24 23:02 chriscarrollsmith

Yep fixed , thanks!

belugawhale3 avatar Mar 12 '24 01:03 belugawhale3