Skip to content

[bug]: shadcn add uses yarn instead of npm #7185

Closed
@Skiuileuf

Description

@Skiuileuf

Describe the bug

I am using a clean install of nodejs
Using shadcn with nodejs and tailwind

When running npx shadcn@latest add sidebar I am getting the following error:

✔ Updating tailwind.config.ts
✔ Updating CSS variables in src\styles\globals.css
⠙ Installing dependencies.
Something went wrong. Please check the error below for more details.
If the problem persists, please open an issue on GitHub.

Command failed with exit code 1: yarn add @radix-ui/react-slot class-variance-authority lucide-react @radix-ui/react-separator @radix-ui/react-dialog @radix-ui/react-tooltip
'yarn' is not recognized as an internal or external command,
operable program or batch file.

I do not have yarn installed and I do not know why it is attempting to use it

Affected component/components

Sidebar, Installer

How to reproduce

  1. run ``npx shadcn@latest add sidebar`
  2. Look at the error message

Codesandbox/StackBlitz link

No response

Logs

System Info

Windows 10, Nodejs 22.14.0 64 bit

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions