Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: When trying to initialize shadcn-ui in an Astro project, I encounter an error: ENOENT: no such file or directory, related to the creation of the folder src/*/lib. #6432

Open
2 tasks done
ilcovo-git opened this issue Jan 23, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@ilcovo-git
Copy link

Describe the bug

Description

When trying to initialize shadcn-ui in an Astro project, I encounter an error: ENOENT: no such file or directory, related to the creation of the folder src/*/lib.

ENOENT: no such file or directory, mkdir 'C:_beppe\Astro_dev\ahorros-familiares-astro-sphere\src*\lib' of my project

I already have a project created based on the AstroTheme called 'Astro-sphere'. I'm not sure if this could be causing the issue when installing shadcn on top of it.

I have tried creating the folders manually, but it still doesn't work. What surprises me is that it mentions a path like src/*/lib, but I don't have this structure in my Astro project. I'm not sure what the * is supposed to refer to

Affected component/components

Installation on Astro

How to reproduce

Steps to reproduce

  1. Create an Astro project using npm create astro@latest.
  2. Configure Tailwind CSS according to the documentation.
  3. Run the command npx shadcn@latest init.
  4. Choose the default options and force dependency installation (--force).
  5. The following error occurs:

Codesandbox/StackBlitz link

No response

Logs

PS C:\_beppe\Astro\_dev\ahorros-familiares-astro-sphere> npx shadcn@latest init
✔ Preflight checks.
✔ Verifying framework. Found Astro.
✔ Validating Tailwind CSS.
✔ Validating import alias.
√ Which style would you like to use? » New York
√ Which color would you like to use as the base color? » Neutral
√ Would you like to use CSS variables for theming? ... no / yes
✔ Writing components.json.
✔ Checking registry.
✔ Updating tailwind.config.mjs
✔ Updating src\styles\global.css
  Installing dependencies.

It looks like you are using React 19.
Some packages may fail to install due to peer dependency issues in npm (see https://ui.shadcn.com/react-19).

√ How would you like to proceed? » Use --force
✔ Installing dependencies.
⠹ Updating files.
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, mkdir 'C:\_beppe\Astro\_dev\ahorros-familiares-astro-sphere\src\*\lib'

System Info

### Additional details
- **Operating system**:Windows 10 
- **Node.js version**: v20.11.0
- **shadcn-ui version**: Latest (`npx shadcn@latest`)
- **Astro version**: "astro": "^4.15.12",
- **Tailwind CSS version**: "^3.4.13"

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues
@ilcovo-git ilcovo-git added the bug Something isn't working label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant