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]: CLI not working properly #6830

Open
2 tasks done
davidaragundy opened this issue Mar 2, 2025 · 6 comments
Open
2 tasks done

[bug]: CLI not working properly #6830

davidaragundy opened this issue Mar 2, 2025 · 6 comments
Labels
bug Something isn't working

Comments

@davidaragundy
Copy link

davidaragundy commented Mar 2, 2025

Describe the bug

Error when creating a new nextjs project using the CLI

Affected component/components

CLI

How to reproduce

  1. npx shadcn@latest init

Codesandbox/StackBlitz link

No response

Logs

C:\Users\david\Downloads>npx shadcn@latest init --src-dir
√ The path C:\Users\david\Downloads does not contain a package.json file.
  Would you like to start a new project? » Next.js
√ What is your project named? ... my-app
√ Creating a new Next.js project.
√ Which color would you like to use as the base color? » Neutral
√ Writing components.json.

Something went wrong. Please check the error below for more details.
If the problem persists, please open an issue on GitHub.

EPERM: operation not permitted, scandir 'C:\Users\david\Application Data'

System Info

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues
@davidaragundy davidaragundy added the bug Something isn't working label Mar 2, 2025
@davidaragundy
Copy link
Author

The error still persist when running the terminal as admin

@davidaragundy
Copy link
Author

davidaragundy commented Mar 2, 2025

It looks like the CLI is trying to access Application Data but that folder no longer exists (Windows 11), it should go to AppData (the new folder).

@davidaragundy
Copy link
Author

Different error in Ubuntu, but the same vibes.

Image

@davidaragundy
Copy link
Author

for now, you can just delete the components.json file and then run again npx shadcn@latest init inside the project

@davidaragundy davidaragundy changed the title [bug]: CLI - EPERM: operation not permitted, scandir 'C:\Users\username\Application Data' [bug]: CLI not working properly Mar 3, 2025
@shadcn
Copy link
Collaborator

shadcn commented Mar 6, 2025

@davidaragundy is this for a new project or an existing one (with a components.json)?

If you have a components.json, you can also try with init --force

@davidaragundy
Copy link
Author

@davidaragundy is this for a new project or an existing one (with a components.json)?

If you have a components.json, you can also try with init --force

New project, created by the CLI.

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

2 participants