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

Can't use update command if components.json is customized #1532

Open
grvcoelho opened this issue Dec 5, 2024 · 1 comment
Open

Can't use update command if components.json is customized #1532

grvcoelho opened this issue Dec 5, 2024 · 1 comment

Comments

@grvcoelho
Copy link

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:

{
	"$schema": "https://next.shadcn-svelte.com/schema.json",
	"style": "default",
	"tailwind": {
		"config": "tailwind.config.ts",
		"css": "src/app.css",
		"baseColor": "neutral"
	},
	"aliases": {
		"components": "$lib/ui",
		"utils": "$lib/ui/utils/index",
		"ui": "$lib/ui/ds",
		"hooks": "$lib/ui/hooks"
	},
	"typescript": true,
	"registry": "https://next.shadcn-svelte.com/registry"
}

I used the add command and it works properly.

However the update command seems to have a problem with the customized paths

  shadcn-svelte  v1.0.0-next.4
│
└  [CLI Error]: Component directory <path_to_my_project>/src/lib/ui/ui does not exist.

Reproduction

  1. Init with different paths for components/hooks/utils/etc
  2. Add some components
  3. Try and use the update command

Logs

No response

System Info

System:
    OS: macOS 15.0
    CPU: (8) arm64 Apple M1
    Memory: 153.53 MB / 8.00 GB
    Shell: 3.7.1 - /opt/homebrew/bin/fish
  Binaries:
    Node: 20.18.0 - ~/.local/share/nvm/v20.18.0/bin/node
    npm: 10.8.2 - ~/.local/share/nvm/v20.18.0/bin/npm
    pnpm: 9.12.0 - /opt/homebrew/bin/pnpm
    Watchman: 2024.11.11.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 131.0.6778.86
    Safari: 18.0
  npmPackages:
    @sveltejs/kit: ^2.9.0 => 2.9.0
    bits-ui: 1.0.0-next.66 => 1.0.0-next.66
    formsnap: 2.0.0-next.1 => 2.0.0-next.1
    lucide-svelte: ^0.468.0 => 0.468.0
    mode-watcher: ^0.5.0 => 0.5.0
    svelte: ^5.0.0 => 5.6.2
    svelte-sonner: ^0.3.28 => 0.3.28
    sveltekit-superforms: ^2.21.1 => 2.21.1
    vaul-svelte: 1.0.0-next.3 => 1.0.0-next.3

Severity

annoyance

@ieedan
Copy link
Contributor

ieedan commented Dec 10, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants