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

"Your file was uploaded, but the callback request to failed. Reason: Fetch Failed."

Hi All, I am following the youtube video tutorial: https://youtu.be/d5x0JCZbAJs?t=3713 I have been banging my head against this issue all afternoon and I don't quite know where I am going wrong. I have tried multiple different things and still can't seem to get the .onUploadComplete chain to fire. ...

React 19 React Hook Form Issues

hey i've tried implementing React Hook Form following shadcn documentation and components. I continue to get this error and couldn't think about a workaround ```...

need help deciding mobile stack

hey, web dev here, hoping someone has mobile knowledge, I want to make something similar to a plane in-flight entertainment as an app(display maps, have some built-in games, play movies etc) while also having shared(or similar) codebase between android/iOS what would be the best option for tech stack? I'm also considering lightweight game engines...

Auth System - Cookie problem

Hey, I have another question. I'm currently trying to convert my AuthSystem from Next 14 to Next15. the cookie set works ``` (await cookies()).set('viewToken', data, {...

Exclude field depends on another field

i have schema model like this ```js model Question { id String @id @default(cuid())...

breaking the Rules of Hooks?

okay, I don't understand react hooks well enough. i'm writing my component this way: ``` function TableRowFromJob (job: JobType) { ...

UploadThing: Image upload successful, but reaching neither onUploadError nor onUploadSuccess

This used to work for some time, but today it stopped working ``` UploadThingError: Something went wrong. Please report this to UploadThing. at INTERNAL_DO_NOT_USE__fatalClientError (index.js:494:52)...

t3 stack and nextjs app router, chat app

Has anyone built a chat application using t3 stack with trpc v11 and nextjs app router?

🐌 Extremely Slow Initial Compilation with Next.js 15.1.0 + tRPC

I recently upgraded to Next.js 15.1.0, and I'm experiencing extremely slow initial compilation times (>22 minutes). Here's what I'm seeing: Environment: - Next.js 15.1.0 - Using tRPC with multiple queries...
No description

utfs.io is blocked by malware bytes browser guard

Solution:
Well it is not being flaged ny more
No description

bunx shadcn@latest init

I prompted v0.dev to create a starter template and I copied the command and changed the npx to bunx --bun and ran it only to find this error
error: Cannot find module '@jridgewell/gen-mapping' from '/private/tmp/bunx-501-shadcn@latest/node_modules/@babel/generator/lib/source-map.js'
error: Cannot find module '@jridgewell/gen-mapping' from '/private/tmp/bunx-501-shadcn@latest/node_modules/@babel/generator/lib/source-map.js'
...
Solution:
simply run bun pm cache rm and rerun the code to fix everything

How to upload a PDF file to uploadthing from a route.ts file

```typescript export async function uploadFileToProfile( pdfBuffer: Uint8Array<ArrayBufferLike>, uniqueMetadataId: string, ) {...

Self hosted Postgres on Create t3 Turbo

I am low key struggling to convert create-t3-turbo db package from using Vercel Postgres to Railway postgres connection. This is what I have now in my client.ts ```...

Vercel Toolbar in Github Codespace

Has anyone successfully set up a github codespace for NextJS development and added the Vercel toolbar to their dev server, such that you can run next dev and see the toolbar when going to https://<codespace-name>-3000.app.github.dev? I keep getting this error: Error loading microfrontend config: TypeError: Failed to fetch...

Multi-Tenant Architecture

Hello good folks. The purpose of this question is to get insight from the more experienced community. I'm trying to build a B2B system with data isolation concerns. For now, I chose to go with a schema-per-tenant data partition strategy. All tenants will share a common set of tables attached to their schema. But, the problem with this approach is the schema managment. To change even a single column across all schemas when you have many tenants is a challenge. I've tried an approach where I use drizzleORM to generate the "template" migration scripts. Then when a request comes in, I read the sql content from the file and replace the placeholder with the tenant's schema name. This works fine for creating new tenants. But the real problem now is global updates. I've not found a reliable way to do this so far....

Error: Attempted to call g() from the server but g is on the client

I'm encountering an error when trying to upload files using the @uploadthing/react package in my Next.js project. The error message indicates that a client-side function g() is being called from the server, which is not allowed. Error Message:
Error: Attempted to call g() from the server but g is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.
at <unknown> (file://C%3A/Users/Rahul/Desktop/jobfynder/node_modules/.pnpm/%40uploadthing%2Breact%407.1.2_next%4015.0.3_react-dom%4019.0.0-rc-66855b96-20241106_react%4019.0.0-rc-66_7ieb7immhhmk3vcbvr5vvoo4ai/node_modules/%40uploadthing/react/dist/button-client-DpQoAqtf.js/proxy.js:28:23)
Error: Attempted to call g() from the server but g is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.
at <unknown> (file://C%3A/Users/Rahul/Desktop/jobfynder/node_modules/.pnpm/%40uploadthing%2Breact%407.1.2_next%4015.0.3_react-dom%4019.0.0-rc-66855b96-20241106_react%4019.0.0-rc-66_7ieb7immhhmk3vcbvr5vvoo4ai/node_modules/%40uploadthing/react/dist/button-client-DpQoAqtf.js/proxy.js:28:23)
...

ArmCord in Theo's video

In this video you showed your currently opened apps and briefly mentioned that you are using a custom Discord Client called ArmCord. I found one github repository but it had 0 stars and is mot activity maintained. And it's a fork of LegCord. What do you use and or what should I use? Thanks in advance

Check for ability to upload file before doing it

Hi all, I'm integrating a limit in my app, in which the free tier allows for X number of files and X number of audio files hours a month. I'm using UploadThing for the file upload and I think it's great, but I want to understand if there's a way to do this kind of checks (maybe at the middleware level) before starting the upload on the UT servers. I know that I can check for this using the onBeforeUploadBegin handle on the uploadthing client library, but I would like to also implement this check on my backend. Thanks in advance, and once I've finished building my app (almost there) I'll be more than happy to become a paid user!...

Something went wrong. Please contact UploadThing and provide the following cause: TypeError: $.get(.

it does complete the upload, but still throws this error: ` const uploader = createUploader('imageUploader', { onClientUploadComplete: (res) => { const updateOK = saveDogPicture(editingDog.id, res[0].url);...