Open TaifurIslamAshraf opened 2 days ago
Yeah, it is also coming for me do you got any solution ?
I need this urgently, is there any other solution for this ?
Do you need a temporary solution for this ?
you can use overrides for a temporary fix.
"overrides": {
"react": "$react",
"react-dom": "$react-dom"
}
[!WARNING]
This is just a temporary fix!
You can also use: npm config set legacy-peer-deps true
You can also use:
npm config set legacy-peer-deps true
No, it did not work for me I tried it. I just cloned old next js project I created in previous week and started using it for development, will change to nextjs 15 after the pr is merged.
Hey @TaifurIslamAshraf,
I tested out this scenario and was able to get shadcn-ui running smoothly with the New York theme and the @radix-ui/react-icons
package.
Here's what I did:
npx shadcn/ui@latest init
, using New York as the style and including @radix-ui/react-icons
.npx shadcn/ui@latest add ...
and made sure to use some icons from @radix-ui/react-icons
.npx @next/codemod@canary upgrade latest
.@radix-ui/react-icons
icon on the homepage for testing.Everything worked both locally and in production without issues.
Prod links: Home page Dashboard page
For reference, here are some key details about my setup:
@radix-ui/react-icons
: ^1.3.0"pnpm": {
"overrides": {
"@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
}
}
Feel free to check out the repo directly here: GitHub Repo to make sure everything is set up correctly. Let me know if you need more details or if there's anything else I can help test!
Describe the bug
While initializing a new Next.js project with shadcn-ui using
npx shadcn@latest init
, the installation fails when attempting to install dependencies. The error occurs because @radix-ui/react-icons has a peer dependency requirement for "react@^16.x || ^17.x || ^18.x", but the project is using React 19.0.0-rc-69d4b800-20241021.Error message: npm error ERESOLVE unable to resolve dependency tree npm error Found: react@19.0.0-rc-69d4b800-20241021 npm error Could not resolve dependency: npm error peer react@"^16.x || ^17.x || ^18.x" from @radix-ui/react-icons@1.3.0
Current environment:
The installation works fine with React 18, suggesting that @radix-ui/react-icons needs to be updated to support React 19 release candidates.
Potential solutions:
Affected component/components
shadcn-ui installation fails
How to reproduce
During the setup, select 'yes' for App Router and other default options
Navigate to the project directory: bash cd my-app
Try to initialize shadcn-ui: bash npx shadcn@latest init
Select configuration options:
The installation will fail during the dependency installation step with the following error:
npm error ERESOLVE unable to resolve dependency tree npm error Found: react@19.0.0-rc-69d4b800-20241021 npm error Could not resolve dependency: npm error peer react@"^16.x || ^17.x || ^18.x" from @radix-ui/react-icons@1.3.0
You can verify the React version in your package.json: { "dependencies": { "react": "19.0.0-rc-69d4b800-20241021", "react-dom": "19.0.0-rc-69d4b800-20241021" } }
Codesandbox/StackBlitz link
No response
Logs
No response
System Info
Before submitting