Repository: ui
Issue: [bug]: Dependency Resolution Error with Shadcn Init Command when working with React19
Labels: bug

### Describing the bug

I am trying to initialize Shadcn in my Vite project using the following command:

`npx shadcn@latest init`

During the initialization process, I encountered a dependency resolution error. Here are the relevant details:

**React Version: 19.0.0-rc-1460d67c-20241003**

Error Message:

![Screenshot from 2024-10-06 19-33-13](https://github.com/user-attachments/assets/959e6a11-aafb-4e7c-a50f-6bd6c97b61e2)

I understand that @radix-ui/react-icons has a peer dependency requirement for React versions 16.x, 17.x, or 18.x, which is incompatible with the React version I have installed.

I considered downgrading my React version to one of the supported versions, but I would rather solve it with some guidance on how to proceed without breaking my current setup, if there is already support for working with React19 and shadcn/ui.

### Affected component/components

involves primarily the @radix-ui/react-icons package

### How to reproduce

1. Create a New Vite Project: `npm create vite@latest` and there you choose React with Typescript
2. Upgrade the React Version to React19: `npm install --save-exact react@rc react-dom@rc`
3. Install dependencies: `npm install`
4. Install Shadcn/UI: Setup Shadcn/UI as descirbed on their webpage and then tun the following command to initiate the Shadcn UI setup: `npx shadcn@latest init`
5. Wait for Dependency Installation: The command will attempt to install various packages, including @radix-ui/react-icons and others.
6. The Error appears, similar to `npm ERR! peer react@"^16.x || ^17.x || ^18.x" from @radix-ui/react-icons@1.3.0` This error indicates that the @radix-ui/react-icons package requires React version 16, 17, or 18, which conflicts with the React version you have (19.0.0-rc).





### Codesandbox/StackBlitz link

_No response_

### Logs

```bash
npx shadcn@latest init
✔ Preflight checks.
✔ Verifying framework. Found Vite.
✔ Validating Tailwind CSS.
✔ Validating import alias.
✔ Which style would you like to use? › New York
✔ Which color would you like to use as the base color? › Zinc
✔ Would you like to use CSS variables for theming? … no / yes
✔ Writing components.json.
✔ Checking registry.
✔ Updating tailwind.config.js
✔ Updating src/index.css
⠹ Installing dependencies.
Something went wrong. Please check the error below for more details.
If the problem persists, please open an issue on GitHub.

Command failed with exit code 1: npm install tailwindcss-animate class-variance-authority lucide-react @radix-ui/react-icons clsx tailwind-merge
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: projectboard@0.0.0
npm ERR! Found: react@19.0.0-rc-1460d67c-20241003
npm ERR! node_modules/react
npm ERR!   react@"19.0.0-rc-1460d67c-20241003" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.x || ^17.x || ^18.x" from @radix-ui/react-icons@1.3.0
npm ERR! node_modules/@radix-ui/react-icons
npm ERR!   @radix-ui/react-icons@"*" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /home/dci-student/.npm/_logs/2024-10-06T17_29_22_397Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /home/dci-student/.npm/_logs/2024-10-06T17_29_22_397Z-debug-0.log
```


### System Info

```bash
Ubuntu 20.04.6 LTS, node version v20.11.1, Ubuntu, npm version 10.2.4, Chrome Browser, using npm as package manager, none relevant global packages used yet
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues