uploadthing server SDK inside tRPC route (monorepo)

Hello everyone šŸ™‚

I'm using the "create-t3-turbo" template and uploadthing, everything works well BUUUUUUUT...

I trigger sometimes from the tRPC api route the uploadthing SDK (UTApi)

Adding the uploadthing package inside the "package/api/package.json" request the following dependencies "react" and "react-dom"

From what I understand the uploadthing package contains everything for the UI and the API but inside the tRPC route the UI isn't necessary so is there a specific package I should use instead of the full uploadthing or is there something wrong to use uploadthing UTApi inside the tRPC route ?

here is the error thrown in the terminal when installing/uploading packages :
packages/api
└─┬ next 14.2.3
  ā”œā”€ā”€ āœ• missing peer react@^18.2.0
  ā”œā”€ā”€ āœ• missing peer react-dom@^18.2.0
  └─┬ styled-jsx 5.1.1
    └── āœ• missing peer react@">= 16.8.0 || 17.x.x || ^18.0.0-0"
Peer dependencies that should be installed:
  react-dom@^18.2.0         react@">=18.2.0 <19.0.0"

I inspected the package-lock file and it s well the uploadthing that request does packages.


In advance thanks a lot for your kind help šŸ™‚
Was this page helpful?