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

Vercel Build, Module not found: Can't resolve path/to/Component

Builds fine locally... ``` [21:35:38.579] Running build in Washington, D.C., USA (East) – iad1 [21:35:38.636] Cloning github.com/niebag/sales-portal-next (Branch: staging, Commit: 9324ee0)...

Invalid environment variables @railway

Hey I get this deploy error on railway: #12 1.341 :x: Invalid environment variables: { NEXTAUTH_SECRET: [ 'Required' ], NEXTAUTH_URL: [ 'Invalid url' ] } anyone can help?...

create-t3 questions

should i have the create-t3-app installed globally? (-g)? i already have a git repo thats empty, i want to use t3 inside of it but without making a sub folder for my project when i run the command it says i dont have create-t3-app installed so i installed it but then it made a node modules inside of my root...

way to organize your tech stack

so i was wondering if anyone had a place or a way they organzied their technologies they used? with a ton of new stuff coming out, I wanted a place or a way to organize how and what technologies I would use. for example like drizzle as an orm, trpc, etc...

Can I use t3 for single page apps?

I've heard next js isnt great for spas, so im wondering if its doable with t3 or if i should pick a different framework. thanks

Use Clerk `getAuth(req)` in a Zact server action

Is there a way to get the Next request object in a Zact server action. I require this to be able to get the current user using Clerk's getAuth function...
Solution:
You gotta do action > server > client because action -> client doesn't support headers yet

ENV ERROR VRECEL

❌ Invalid environment variables: { Github_CLIENT_ID: [ 'Required' ], Github_CLIENT_SECRET: [ 'Required' ] } error - Failed to load next.config.mjs, see more info here https://nextjs.org/docs/messages/next-config-error...

useMutation param syntax

Hi guys, I forgot how to add specific params / input to my useMutation, how can I do that for example here: ```ts const { isLoading, mutate, error, isSuccess } = api.realEstate.updateStatus.useMutation();...

Strange network activity in devtools

Hi I'm learning t3 stack with this project (https://github.com/t3dotgg/chirp) I noticed a strange behavior on the live Chirp project page (https://xn--uo8h.t3.gg/) A network request is being made everytime I click somewhere in the devtools then back on the page. Steps to reproduce: - Go to the live project page and open the devtools' network tab...
Solution:
Found the culprit, it was react-query

nextjs env t3 runtime error

I think i setup everything just as the docs said but i get the bellow error in the attached screenshot error : ``` Unhandled Runtime Error...

getServerAuthSession at any place crashes my app. 5000+ errors per second!

Below, I have my server component for rendering a hamburger menu based on whether the user is authenticated. ```ts const SidebarMobile = async () => { const session = await getServerAuthSession(); ...

MySQL GUI

This might be a dumb question, but for those of you on planetscale, what tool do you use to view your database data. During development I just used prisma studio, and perhaps that's ok in prod too? Or is there another tool that people use to view the data in the db?

Weird error in trpc procedure

I am writing a simple create mutation but im getting some weird ts error. I tried restarting the ts server but no luck ``` export const postRouter = createTRPCRouter({ create: protectedProcedure...

405 Error with S3 Presigned URL's

I currently have a 'PDF viewer' on my website which is suppose to render a PDF from my s3 bucket and prevent the user from being able to download, print, etc the pdf. Here's the code for the /exams/page.tsx file (the PDF viewer) ```"use client"; import React, { useState, useEffect } from "react";...

unless if want to share components / utils between packages , why we need a mono repo ? T3 cli app ?

The T3 Cli have www for the website and a cli , but they dont share any thing in common except the tsconfig. Why do we need a turbo repo for this. If they were two different packages , two git repo , then what change we would have seen ?

Need clerk webhook example

I have been trying to configure a webhook to be called as soon an organization has been created and the webhook should call a prisma query to do a DB entry but I couldnt find any example that would help me configure this. I am using pages router....

GitHub Action Failing Type-Checks but Working Locally

I'm setting up an automatic github action that will run type checks on my nextjs app when pushed / pr'd to main. Problem is the type checks fail in github actions but pass locally. ```yml .github/workflows/status-checks.yml name: Status-Checks ...

looking for some tutorials

coming from a rails background, im new to node & t3 in general, is there a tutorial i can follow to play around with the t3 template?

is it worth it to have meaningful errors returned from server side form validation?

like is it worth it at that point to return an error for every field that is invalid from the backend or should you just throw a bad request assuming you already have full validation on client side like if someone does somehow bypass client validation lets say by disabling javascript is it even worth it to have meaningful server errors for every field i can see the argument for progressive enhancement but like if you want to have good ux on forms it feels like you almost always need javascript...

Good setup for CRA + Serverless in a monorepo?

Hey folks, what’s a good setup for a serverless function and a CRA in a monorepo? If I’m able to stick within vercel’s ecosystem, that’d be cool too....