-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[bug]: Installation fails with Next.js 15 and/or React 19 #5557
Comments
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: |
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 Here's what I did:
Everything worked both locally and in production without issues. Prod links: For reference, here are some key details about my setup:
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! |
i got this like error but u can fix in
|
Solution is to install |
I keep getting this error what should I do? |
I found a solution. Use pnpm package manager |
Just using pnpm solves it? |
Yes |
I guess that's why my setup had no issues then, using pnpm |
Nahh man it must be due to the new release ig |
check the blog solve this problem |
Can someone confirm if this it works with
|
Anyone know how to fix the error 'button cannot be used as a JSX component' in a turborepo? I have to add pnpm overrides in the root workspace but that is also giving me an error |
This works very well |
For NextJS15 and React19, if you use "overrides": {
"react-is": "$react-is",
"@types/react": "npm:[email protected]",
"@types/react-dom": "$@types/react-dom-rc.1"
},
"resolutions": {
"@types/react": "npm:[email protected]",
"@types/react-dom": "npm:[email protected]"
} |
I also see this issue. |
Could be a temporary solution, this works for me:
|
Nextjs got updated with react stable , why are still getting the |
Any update regarding nextjs15 and other one more library that creates problem for installation:- Radix? |
I have a problem related to this. I'm using
However, this fails because it tries to run
|
What is actually required for ShadCN to support React 19? I'll start a list: |
Same here! |
I think one thing that can be done is to use try to run in the command prompt I am unsure about this command, please let me know if it works. |
Maybe it helps some of you, if you have similar issue in running pipeline using command
and got pipeline failed as follow:
Searching a bit on google, I came across this post. Here is the package.json file:
|
It happened to me when I wanted to use the Date Picker component, I don't remember well, but what I remember is that I installed |
I'm still running into this issue w/ bun
and when using
|
Is this bug resolved now? I am so cold, because my boss asked me to blow cold air until it can be solved |
@kurorinto Solution for me was: npm install [email protected] [email protected] |
Hi, I had this issue after upgrading to React 19 and Tailwind CSS v4. However, I believe it will also work with just React 19. I encountered some other problems, but for the calendar specifically,
|
Yes. This is fixed in the latest release. Please give it a try and let me know. |
Hi ShadCN, hope you're doing well. I tried updating the calendar again, and while it did fix the issue, it didn’t work as expected. The problem occurs when running:
it downgrades react-day-picker to version ^8.10.1. As a result, when I deploy the project to Vercel in my case I'm encountering an error because the date-fns and react-day-picker versions aren't compatible. I've fixed the issue in my code. If you're open to it, I can create a pull request with my updates, and you can review and merge it. Thanks for your time! Best regards, |
@L3on06 oh sorry. I was replying to the original post about |
How much time it gonna take?
|
@shadcn npx shadcn@latest add calendar it downgrades react-day-picker to version ^8.10.1. As a result, when I deploy the project to Vercel in my case I'm encountering an error because the date-fns and react-day-picker versions aren't compatible. mean while I have fixed using ->
in package.json file |
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: [email protected]
npm error Could not resolve dependency:
npm error peer react@"^16.x || ^17.x || ^18.x" from @radix-ui/[email protected]
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: [email protected]
npm error Could not resolve dependency:
npm error peer react@"^16.x || ^17.x || ^18.x" from @radix-ui/[email protected]
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
System Information: Operating System: - Windows 8 - Working in Command Prompt Node Environment: - Node.js version: v20.17.0 - npm version: v10.9.0 Project Dependencies: - Next.js: 15 - React: 19.0.0-rc-69d4b800-20241021 - React DOM: 19.0.0-rc-69d4b800-20241021 - Typescript: ^5 - Tailwind CSS: ^3.4.1 CLI Versions: - create-next-app: latest - shadcn-ui CLI: latest (@shadcn/ui) Additional Context: - Fresh installation with default configurations - Using App Router - Project created with TypeScript and Tailwind CSS enabled
Before submitting
The text was updated successfully, but these errors were encountered: