Closed znichola closed 8 months ago
I got around the problem by importing the arrow from radix-icons-svelte
// import ArrowRight from "svelte-radix/ArrowRight.svelte";
import { ArrowRight } from "radix-icons-svelte";
// import ArrowLeft from "svelte-radix/ArrowLeft.svelte";
import { ArrowLeft } from "radix-icons-svelte";
@znichola Thanks for raising an issue!
The fix for you will be to install svelte-radix
, the icon library (not radix-svelte
).
This is a bit of an oversight on our part as the icon library type is installed on init
, so any users that initialized their project before we replace radix-icons-svelte
will have issues when they try to add
or update
their components. We'll need to figure out a way to address this.
I suppose one possible way would be determining if the component relies on that icon pack and if it isn't installed, install it or perhaps even prompt the user if they wish to install it (in case they intentionally removed it to replace with an icon pack of their own).
Though this would get annoying after a while considering any new projects will have the right icons installed on init
, so now I'm wondering if this is even worth addressing at the CLI level.
I'm not sure the CLI update tool works. I updated to 0.8.0 then ran npx shadcn-svelte@latest update sheet. This didn't update the sheet to the 0.8.0 version which doesn't use the svelte-radix icons. Is the only way to update to the newer version that has the icon fix to manually copy paste?
The latest version of the components does use the svelte-radix
icons. We dropped radix-icons-svelte
@TomWaterz
ah ok gotcha ty
Closing this as this only effects existing installs and we can point to this issue should the issue arise.
Still an issue with new installs. Using the combobox. Maybe because I'm using SvelteKit with Svelte 5?
<script lang="ts">
import Check from 'svelte-radix/Check.svelte';
import CaretSort from 'svelte-radix/CaretSort.svelte';
Error: Command failed with exit code 1: npm i cmdk-sv bits-ui svelte-radix
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: editor@0.0.1
npm error Found: svelte@5.0.0-next.225
npm error node_modules/svelte
npm error dev svelte@"^5.0.0-next.1" from the root project
npm error
npm error Could not resolve dependency:
npm error peer svelte@"^3.54.0 || ^4.0.0 || ^5.0.0" from svelte-radix@1.1.0
npm error node_modules/svelte-radix
npm error svelte-radix@"*" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
You're still using svelte-radix@1.1.0
should be svelte-radix@1.1.1
I added the select component and run svelte check command and i ran into this error
Error: Cannot find module 'svelte-radix/Check.svelte' or its corresponding type declarations. (ts)
import { Select as SelectPrimitive } from "bits-ui";
import Check from "svelte-radix/Check.svelte";
import { cn } from "$lib/utils.js";
Error: Cannot find module 'svelte-radix/CaretSort.svelte' or its corresponding type declarations. (ts)
import { Select as SelectPrimitive } from "bits-ui";
import CaretSort from "svelte-radix/CaretSort.svelte";
import { cn } from "$lib/utils.js";
====================================
svelte-check found 2 errors and 0 warnings in 2 files
I am using Svelte 5 and SvelteKit. I couldn't seem to find any fixes in the above comment do you have any solution for this?
I added the select component and run svelte check command and i ran into this error
Error: Cannot find module 'svelte-radix/Check.svelte' or its corresponding type declarations. (ts) import { Select as SelectPrimitive } from "bits-ui"; import Check from "svelte-radix/Check.svelte"; import { cn } from "$lib/utils.js"; Error: Cannot find module 'svelte-radix/CaretSort.svelte' or its corresponding type declarations. (ts) import { Select as SelectPrimitive } from "bits-ui"; import CaretSort from "svelte-radix/CaretSort.svelte"; import { cn } from "$lib/utils.js"; ==================================== svelte-check found 2 errors and 0 warnings in 2 files
I am using Svelte 5 and SvelteKit. I couldn't seem to find any fixes in the above comment do you have any solution for this?
I was having the same issue, i don't think that svelte-radix is installed by default from the CLI init. Just manually installed svelte-radix
and that fixed the issue.
Thanks! that worked
Describe the bug
My guess is svelte-radix was not added as a dependancy
I've tried adding it to my packages with
npm install radix-svelte
but no dice, so I'm no longer sure what the fix should be.Reproduction
start a new project with shadcn-svelte and add the carousel with
npx shadcn-svelte@latest add carousel
and the project stops building.Logs
System Info
Severity
annoyance