shadcn components are not working with next 15
Link to the code that reproduces this issue
https://github.com/SARATHKUMAR-T/next15
To Reproduce
- create new app with
npx create-next-app@latest - try to install shadcn ui with
npx shadcn@latest init
Current vs. Expected behavior
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Oct 2 16:16:55 UTC 2
Available memory (MB): 11821
Available CPU cores: 4
Binaries:
Node: 20.13.1
npm: 10.5.2
Yarn: 1.22.22
pnpm: N/A
Relevant Packages:
next: 15.0.1 // Latest available version is detected (15.0.1).
eslint-config-next: 15.0.1
react: 19.0.0-rc-69d4b800-20241021
react-dom: 19.0.0-rc-69d4b800-20241021
typescript: 5.6.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
create-next-app, Developer Experience
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local), Vercel (Deployed)
Additional context
No response
This isn't NextJs issue seems like issue with radix-ui/react-icons library dependency list.
https://github.com/radix-ui/icons/pull/184#issuecomment-2436109770
can use the above link for temporary solution.
As mentioned by @needim in this comment, the following override is a temporary workaround.
"overrides": {
"@radix-ui/react-icons": {
"react": "$react"
}
}
Link to the code that reproduces this issue
https://github.com/SARATHKUMAR-T/next15
To Reproduce
- create new app with
npx create-next-app@latest- try to install shadcn ui with
npx shadcn@latest initCurrent vs. Expected behavior
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Oct 2 16:16:55 UTC 2 Available memory (MB): 11821 Available CPU cores: 4 Binaries: Node: 20.13.1 npm: 10.5.2 Yarn: 1.22.22 pnpm: N/A Relevant Packages: next: 15.0.1 // Latest available version is detected (15.0.1). eslint-config-next: 15.0.1 react: 19.0.0-rc-69d4b800-20241021 react-dom: 19.0.0-rc-69d4b800-20241021 typescript: 5.6.3 Next.js Config: output: N/AWhich area(s) are affected? (Select all that apply)
create-next-app, Developer Experience
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local), Vercel (Deployed)
Additional context
No response
its not really a bug, i install everything by hand, left out the @radix-ui/react-icons and use another icon provider like lucide
or like @gfargo mentioned you can use the override but that will need more maintaining or is some deps break at runtime, so the secure way is use other icon provider until @radix-ui/react-icons update their lib.
hope it helps. ◦°˚(*❛‿❛)/˚°◦
