john093e
john093e
Explore posts from servers
TTCTheo's Typesafe Cult
Created by john093e on 5/15/2024 in #questions
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"
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 🙂
1 replies