Theo's Typesafe Cult

TTC

Theo's Typesafe Cult

Join the community to ask questions about Theo's Typesafe Cult and get answers from other members.

Join

Pandacss unknown values

Hey I am looking for some proficient in pandacss. First of all using pandas wasn't my choice. The problem:...

Outbox pattern with mariadb and rabbitmq

Hi all, I am looking to implement an outbox-pattern with MariaDB and RabbitMQ for reliable microservices async communication. (NodeJS+Express) Is there anyone here who implemented it to maybe give me some heads up for unpredictable things that I'll be dealing with?...

I'm using uploadthing version ^6.13.0, @uploadthing/react version ^6.7.0

While uploading image I ran into a RuntimeException that said: Cannot execute an Effect versioned 3.4.5 with a Runtime of version 3.4.2 I guess it is some kind of version mismatch but I can't figure it out, also tried searching the docs...

Using nextauth discord with vercel deployments

New to T3 and nextauth here, and I have a noob question: If I configure discord oauth, discord requires me to register exact URIs for login redirects, but Vercel deployments have dynamic URIs for each branch, so a new branch deployment will never match. I can get any deployment to work by manually adding its URL to the discord app management page, but is there a way to make it work for any vercel branch? If not, do you have a preferred workaround/working style that you think is most effective? M...

Prevent Server Action from getting called if unrelated Search Param changes

const Page = async ({searchParams}: { searchParams: { type: string; }; }) => {...

Creaete T3 No Req or Res in TRPC context

I am trying to integrate clerk with the trpc create context, but the createContext generated by create-3t isn't passing the req or res of the request. What can I do?...

Passing async data to server components

hey guys. I have a basic question - I'm fetching some "slow" data in a server component (at the page level). There are several components on the page that depend on it, so I'm currently awaiting that data, but obviously it means I have to wait before I get anything. ...

I have been trying to get cache working with React-Query and Next.JS

Hello there, I'm trying to get this cache to work but I have searched far and wide and unless I'm blind or I didn't use the right keywords, I can't get this to work. Here is the sample code: ```ts const { data, isPending, isStale } = useQuery({...
Solution:
By default React query doesn’t use a persistent cache - so when you refresh you lose everything. Check out the docs here: https://tanstack.com/query/latest/docs/framework/react/plugins/persistQueryClient...

Anyone who knows CF Zero-Trust well?

I have a homelob running proxmox, i have exposed it through a Tunnel, i have it behind Access too, i want to be able to give access to all devices/users currently on the zero-trust network using the warp-client. it is possible? any workarounds for that, like, if not a warp-cli zero-trust-enrolled tries to access the protected url, they see the Access page, but when a device active on my organisations's network tries to access, they go straight to the app...
Solution:

Vercel server environment variables not pulling in

I am currently using using T3 Env for type safe environment variables however on vercel it seems that the server environment variables aren't pulling in for some reason. it builds fine in locally and builds fine using the Vercel CLI using vercel pull and vercel build. I have checked that my environment variables are correct in my settings and they are and are set for the right environments. This is the error I see: ```bash...

Shadcn Dialog + Form Error: React.Children.only

Hello, I'm want to use a From from shadcn inside a dialog from shadcn but I have this error : Error: React.Children.only expected to receive a single React element child. I don't really understand why it's the case I belive the error is caused by the <Form> ```tsx...

Most efficient monolith structure to have an Express.js REST API with Next.js SSR client?

https://stackoverflow.com/questions/78670127/most-efficient-monolith-starter-project-structure-to-have-an-express-js-rest-api Hi there! I'm starting a fulltack JS application, but would like to know your opinions on how an express.js server should be set for a Next.js frontend (Next.js API development is not an option for this purpose)....

View transitions aren't working with multiple elements with the same classname

Hey, I have quite a unique problem and I tried searching for the solution but view transitions are relatively new. I am using the next-view-transitions package. View transitions work how I expect them to when there is a singular element with the transition classname. But, I want to map through posts, and then when you click on that post, the title of the post transitions smoothly onto the next page. I have deduced the problem to the fact that if you have multiple elements with the same transition name, then it will not work. Im wondering if anyone has a solution to this problem. Possibly dynamic classnames, manually defining classes 1-10 and using pagination so they each have their "individual values", but all of those solutions seem very complex for something that may be so simple. Thanks! Non Working: ```ts {basePosts.map((post, _idx) => ...

create t3 app breaking next-theme?????

dudes and dudettes. im having a surreal issue with next theme. though if i initiated the whole app using t3 app it breaks while if i do so with normal create-next-app. i functions normally. there is really not much in the...

Turbo and prisma dont work together?

its weird that prisma does give errors such as cannot convert null to object on some stuff like creating a post or filtering by post cateogry while when i remove the --turbo flag from the dev command it doesnt. then i found ```ts...

json schema to yup raw version

I am trying to get the raw yup object with the chaining functions from a json schema. Tried some libraries but didn't know how to get the raw yup. ``` const schema = { title: "Person", description: "A person",...

Prefetching deeply nested loading.tsx doesn't work on NextJS 14

I have been banging my head around this for 3 days but i just don't understand why this is happening. Here's the issue: app/route-1/loading.tsx <--- This is prefetched when you open example.com/ app/route-2/nested/loading.tsx <--- This isn't prefetched when opening example.com/ app/route-3/(nested)/loading.tsx <--- This also isn't prefetched when opening example.com/...

ERROR! Invalid config: UnknownFileType

trying to use upload thing for my project. I am working with source 2 demo files. I used this mimetype checker, https://www.htmlstrip.com/mime-file-type-checker and it returns as application/octet-stream so i used that in the filerouter. However, when i try to upload anything, I just get UnkownFileType, and from the json request I can see that it is empty. They are large files, so checking the type might take some time, as the tool I linked did, but since it returns nothing, any way to manually...

Connecting to websockets in app router

I am looking to build an application that does the following: - connect to zoom - get users from zoom - subscribe to their status ...

Issue with Fetching PDF from Uploadthing in the server

I'm trying to fetch a PDF from Uploadthing in the server, but many time it fails. How can I fix this issue so it always fetches the PDF without problems? ```ts let response; let retries = 5;...