Skip to content

Error when adding shadcn/ui component. #78

@d0ngjini

Description

@d0ngjini

Error when adding shadcn/ui component.

~\Desktop\dev\projects\search-api-dashboard git:[main] pnpm dlx shadcn@latest add sidebar

Packages: +170
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 170, reused 123, downloaded 47, added 170, done
✔ Checking registry.
⠋ Updating tailwind.config.js
Something went wrong. Please check the error below for more details.
If the problem persists, please open an issue on GitHub.

ENOENT: no such file or directory, open 'C:\Users\*******\Desktop\dev\projects\search-api-dashboard\tailwind.config.js'

I found an error in components.json. The tailwind.config setting was pointing to tailwind.config.js, but the correct setting is tailwind.config.ts. After fixing this configuration, I was able to add the desired UI components successfully.

✔ Checking registry.
✔ Updating tailwind.config.ts
✔ Updating app\globals.css
✔ Installing dependencies.
✔ Created 8 files:
  - @\components\ui\sidebar.tsx
  - @\components\ui\button.tsx
  - @\components\ui\separator.tsx
  - @\components\ui\sheet.tsx
  - @\components\ui\tooltip.tsx
  - @\components\ui\input.tsx
  - @\hooks\use-mobile.tsx
  - @\components\ui\skeleton.tsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions