#how to deal with error during shadcn

8 messages · Page 1 of 1 (latest)

thorny flare
#

PS C:\Users\janku\Documents\nextvend> npx shadcn@latest add select
✔ Checking registry.
⠸ 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 @radix-ui/react-select
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @xixixao/uploadstuff@0.0.5
npm error Found: react@19.1.0
npm error node_modules/react
npm error peer react@"^18.0.0 || ^19.0.0 || ^19.0.0-0" from @clerk/clerk-react@5.32.0
npm error node_modules/@clerk/clerk-react
npm error @clerk/clerk-react@"^5.32.0" from @clerk/nextjs@6.22.0
npm error node_modules/@clerk/nextjs
npm error @clerk/nextjs@"^6.22.0" from the root project
npm error peerOptional @clerk/clerk-react@"^4.12.8 || ^5.0.0" from convex@1.24.8
npm error node_modules/convex
npm error convex@"^1.24.8" from the root project
npm error peer react@"^18.0.0 || ^19.0.0 || ^19.0.0-0" from @clerk/nextjs@6.22.0
npm error node_modules/@clerk/nextjs
npm error @clerk/nextjs@"^6.22.0" from the root project
npm error 49 more (@clerk/shared, @floating-ui/react-dom, ...)
npm error
npm error Could not resolve dependency:
npm error peer react@"^18.2.0" from @xixixao/uploadstuff@0.0.5
npm error node_modules/@xixixao/uploadstuff
npm error @xixixao/uploadstuff@"^0.0.5" from the root project
npm error
npm error Conflicting peer dependency: react@18.3.1
npm error node_modules/react
npm error peer react@"^18.2.0" from @xixixao/uploadstuff@0.0.5
npm error node_modules/@xixixao/uploadstuff
npm error @xixixao/uploadstuff@"^0.0.5" 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
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:

finite cradleBOT
#

Hi @thorny flare. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

The error you're encountering is a dependency conflict between different versions of React required by your packages—specifically, @xixixao/uploadstuff@0.0.5 requires react@^18.2.0, but your project is using react@19.1.0. This is a common issue when upgrading to React 19, especially with packages that haven't yet updated their peer dependencies to support React 19.

From the knowledge sources, this type of conflict has been reported by other Convex users, particularly when using uploadstuff with React 19 and Convex. The recommended approach is to check if the package (in this case, @xixixao/uploadstuff) has released a version compatible with React 19. If not, you may need to:

  • Downgrade React to 18.x if possible, or
  • Remove or replace the conflicting package, or
  • Use npm install with the --legacy-peer-deps or --force flag to bypass the peer dependency check (note: this can lead to runtime issues if the packages are truly incompatible).

For example, you can try:

npm install --legacy-peer-deps

or

npm install --force

However, be aware that this is a workaround and may not be stable for production use.

This issue is not unique to your setup and has been discussed in the Convex community, especially after upgrading to React 19 with the compiler, which can break builds and deployments on platforms like Vercel when using uploadstuff. If the problem persists, monitor the package repositories for updates or consider opening an issue with the package maintainers for React 19 support. You can also follow related discussions for updates and possible fixes Discord: Issue with uploadstuff Package Breaking Builds on Convex and Vercel.

#

In summary:

  • This is a known dependency conflict with React 19 and uploadstuff.
  • Use --legacy-peer-deps or --force as a temporary workaround.
  • Watch for package updates or consider downgrading React if you need immediate stability.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@thorny flare Kapa.ai is still learning and improving, please let me know how I did by reacting below.

thorny flare
#

@finite cradle but this corrupt npx shadcn@latest add and i can't add anything

finite cradleBOT
#

Let me check the knowledge base for you again. One moment! :books:

#

I'm sorry, but the knowledge sources do not contain specific information about resolving issues with npx shadcn@latest add being blocked by dependency conflicts (such as with @xixixao/uploadstuff and React 19) in a Convex project. The sources do confirm that dependency conflicts with React 19 and certain packages (like uploadstuff) are a known issue and can break builds or block installs, but they do not provide a Convex-specific or shadcn-specific solution beyond general npm workarounds like using --legacy-peer-deps or --force during installation.

If these workarounds do not allow you to proceed with npx shadcn@latest add, and you cannot remove or downgrade the conflicting package, the knowledge sources do not offer a more targeted solution. You may need to monitor for updates from the package maintainers or seek further help in the relevant package or Convex community channels for a more robust fix see discussion.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: