-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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]: shadcn add EACCES: permission denied, scandir #4813
Comments
same issue here |
Funnily enough I too am having that issue |
This error seems to occur if you have a folder in your project directory that the shadcn CLI does not have enough permissions to access. In my project folder, I had a Docker persistence volume that the shadcn CLI could not access. I suggest adding an option for the Shadcn CLI to ignore specific directories, allowing users to list directories that the CLI should not scan. |
In the meantime, you can modify the permissions of the directory with permission issues to allow read and write access for all users: sudo chmod -R 755 /path/to/folder/with/restricted/permissions |
The shadcn CLI init/scan must have nothing to do with folders other than ${PROJECT_PATH}/components/ui. If needed, the init/scan function only needs to init/scan the -p PATH used. |
Describe the bug
Having a 'data' docker/podman folder at the same level of components,
Gives a :
Even if i run
shadcn add button -p ./components/ui
This also fails on a
shadcn init
, having the data folder previously created/usedAffected component/components
CLI add/init
How to reproduce
shadcn init
EACCES: permission denied, scandir ...SOMEPATH
shadcn add button -p ./components/ui
✔ Checking registry.
✔ 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.
EACCES: permission denied, scandir ...SOMEPATH
Codesandbox/StackBlitz link
No response
Logs
No response
System Info
Before submitting
The text was updated successfully, but these errors were encountered: