-
-
Notifications
You must be signed in to change notification settings - Fork 356
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
Can't use update
command if components.json is customized
#1532
Labels
Comments
I can't seem to reproduce this with the details you provided. Can you try and provide a stackblitz or repository that this can be reproduced in? |
Hi, I came across the same problem with the following {
"$schema": "https://next.shadcn-svelte.com/schema.json",
"style": "default",
"tailwind": {
"config": "tailwind.config.js",
"css": "src/app.css",
"baseColor": "slate"
},
"aliases": {
"components": "$lib/components",
"utils": "$lib/utils/shadcn-helper",
"ui": "$lib/components/primitives",
"hooks": "$lib/hooks"
},
"typescript": true,
"registry": "https://next.shadcn-svelte.com/registry"
} I found a fix that resolves this issue for me:
ui directory is hardcoded.The correct way would be to use the resolved alias path: const componentDir = path.resolve(config.resolvedPaths.ui); I hope this helps. |
Slartibartfass2
added a commit
to SE-UUlm/snowballr-frontend
that referenced
this issue
Jan 2, 2025
…ompatibility issue In Svelte 5.16.0 the code of the shadcn components got broken due to a bug. This got fixed in huntabyte/shadcn-svelte#1585. To reproduce this I ran the shadcn cli update command locally (commit f06d2a1133c9df77902e62d4da79842a6b0af329). Due to a bug in the cli command, which was already reported in huntabyte/shadcn-svelte#1532 I had to adjust the code. The update command did overwrite some customizations we already made, which I undid.
Slartibartfass2
added a commit
to SE-UUlm/snowballr-frontend
that referenced
this issue
Jan 6, 2025
…ompatibility issue In Svelte 5.16.0 the code of the shadcn components got broken due to a bug. This got fixed in huntabyte/shadcn-svelte#1585. To reproduce this I ran the shadcn cli update command locally (commit f06d2a1133c9df77902e62d4da79842a6b0af329). Due to a bug in the cli command, which was already reported in huntabyte/shadcn-svelte#1532 I had to adjust the code. The update command did overwrite some customizations we already made, which I undid.
@huntabyte I would be happy to help and create a pull request. |
That would be great @Slartibartfass2 ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Important: using shadcn-svelte@next
I've initialized a new repo with init command and changed the paths to these:
components.json:
I used the
add
command and it works properly.However the
update
command seems to have a problem with the customized pathsReproduction
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: