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
NnyanSpruk4/27/2024

t3 starter app with nextauth auth.ts config problems

```tsx const config = { providers: [GoogleProvider, FacebookProvider], adapter: DrizzleAdapter(db, createTable) as Adapter, callbacks: {...
Ccucaracha4/27/2024

whats the proper way to disable auto zoom focus on inputs and textareas on mobile?

whats the proper way to disable auto zoom focus on inputs and textareas on mobile? i know you can set max scale but ive heard thats bad practice. is there any other way to do this thats not considered "bad practice". i dont want to increase my font size too 16px +. anyone know how to hack this?
DDor4/27/2024

internal server error when deploying to DigitalOcean

When entering some specific pages in my site, the server gets an error and shuts down. Why is this happening? I run it locally - everything works I run it on vercel - everything works...
XXavierBread4/27/2024

error: NEXT_REDIRECT

I'm doing a server call in RSC, but it crash the app and show this kind of error and It shows in the pic. So, how to make a redirect when user validation failed in a trpc middleware? https://github.com/Dieber/t3-test-redirect...
No description
SHSSabbir Hossain Shuvo4/27/2024

Nodejs take less time instead Bun

Why they close this issue?? https://github.com/oven-sh/bun/issues/10519...
Rraphico4/27/2024

Testing in react

Hey everyone, I’ve been pondering whether diving into learning how to test React code is worth it. Does anyone here test their React code, and if so, how crucial do you find it? Appreciate any insights or experiences you can share!
NnyanSpruk4/27/2024

Create t3 app with nextauth and new router problems

I have a question regarding the t3-createapp with nextauth. In what file do I put my <SessionProvider> ? I would've assumed that the t3 app generator would handle that for me, but it didn't, and im not sure where to put it. I am trying to do it in the app/layout.tsx like i did with my normal next project that im using for reference, but its not working. ...
Mmchisolm04/27/2024

Modals failing from tutorial

https://github.com/mchisolm0/gallery/pull/2 I am having trouble getting the modals/app router working how I expect. When I click on pictures sometimes it loads, sometimes it gives "Unauthorized" errors, and sometimes it complains getImages(idAsNumber) is not a function. I have created a pull request on my repo in case that is helpful for context. I am getting off of hear to get some rest and hoping fresh eyes tomorrow may help me solve it. Thank you in advance if anyone has suggestions or wisdom....
GGetPsyched4/26/2024

Benefits of using auto incrementing primary keys?

Is there any benefit of using auto incrementing columns as primary keys in postgres when I have another column that is unique and can be used as a primary key?
Bbythewayitsjosh4/26/2024

Is Tanstack Query needed when using Next Route Handlers?

Basically what it says. To my understanding a Route Handler is basically a custom built endpoint that receives a Request and returns a Response. Standard REST-ful stuff really. With that in mind, if I'm fetching data on the client, would something like Tanstack Query still be relevant / provided any significant value? I know the Route Handlers already include caching and revalidation, as does TQ, but I'm not sure if TQ provides anything further that makes it worth including. Given the versatile nature of TQ and the sheer number of features, I imagine so, but wanted to check they weren't already covered by Next....
JJustinR4/26/2024

t3 env doesn't seem to work with docker compose build

I'm working to validate my application before pushing it to my CI/CD pipeline. I keep getting failed docker builds because it can't find my environment variables, I'm using the recommended dockerfile in the t3 documentation to build the container ```yaml app: build:...
BBigLung4/26/2024

NextAuth - Email Provider Breaking Google Provider!

Howdy, Some users of my app (app.getriver.io) started reporting not being able to log in to our app. We tested and figured out that some people who originally signed up with email + magic link are then trying to sign in with google (but connected to the same email they originally authenticated with) Is it possible to intercept login attempts like this so that you can interchangably login with email or google for the same email?...
CCircus4/26/2024

VSCode Import Autocomplete Purgatory (Relative, absolute, and barrel paths)

I hope I'm missing some easy setting, otherwise this UI seems pretty terrible. Why does the autocomplete path for barrel imports not show up on autocomplete? Manually typing out import {Avatar} from '@components works and does not cause issues in the code, so this is certainly a VSCode setting of some sort ``` // src/app/_components/index.tsx import Avatar from "./Avatar";...
No description
Ddeforestor4/26/2024

The In App vs NextAuth problem

If you open the app link from a mobile app (like discord/telegram) and it opens in the in-app browser instead of the default browser, the Sign up will fail. Does anyone recommend any way to deal with this? I'm not sure if NextAuth has an option to allow built-in browsers, but I couldn't find anything. My other idea was to prompt the user to open the default browser instead, but this sucks...
Solution:
Thanks for the answer. I'm not exactly sure if the built-in browser was the problem, it was more of a guess. My friend and coworker @BigLung fixed it with the help of this post https://github.com/nextauthjs/next-auth/issues/519#issuecomment-1326847336...
Mmchisolm04/26/2024

TypeErrorinitialTree is not iterable in Modern React Tutorial vid

The images map correctly until I try clicking on one, so I think the error may be misleading me. I believe I have the modal set up to show the id at the bottom of the screen as shown in the tutorial, however, when I click the image I get the global error page. Sentry captures the above "initialTree is not iterable" which seems to mean I'm trying to map something that can't be mapped....
Solution:
I figured it out now. I misunderstood the folder structure. Correct: app/@modal/(.)img/[id]/ My error was thinking the (.) was another layer of the directory making it app/@modal/(.)/img/[id]....
YTyoung T4/26/2024

T3 Roadmap? What would you recommend?

I recently landed an internship, and they use the T3 Stack. I already had experience with JS, React, and had briefly used Node.js with Express. Also I have decent database knowledge. I'm already learning Next.js 14, it hasn't been hard so far, but like I said, I haven't used Node.js too much, and my backend skills aren't good. Honestly I was mostly applying to Front-end positions, but got this Full-Stack one. The thing that is being hard for me the most is tRPC, I feel like I don't understand n...
Mmag4/26/2024

are there any better logs for nextJS that are in English

just spent 30min playing around with this and trying to work out the problem all I did was copy and paste a table from Nextui and spent 30min breaking down and checking my code one section at a time to try to work out the erra Error: Functions are not valid as a child of Client Components. This may happen if you return children instead of <children /> from render. Or maybe you meant to call this function rather than return it. <... columns={[...]} children={function children}> ...
VVision20234/25/2024

Should I report a bug to a federal(-ish) university without hopes of a bug bounty?

I live in nigeria, I attend national open university of nigeria. I recently found out a bug which allowed me to register all my courses without payment(I.E Basically attend the university for free), change stuff like number of credit units(which allows me to take on infinite courses, register courses I shouldn't have access to and stuff like that. There is prolly more (given their terribly designed api) but I didn't look further. I'm wandering whether I should report the bug since I dont know if I have hopes of a bug bounty. P.S I really need money rn so looking for any way to get some....
GGus4/25/2024

Fork bomb

Hi, i saw the new video from theo about the AI interview, and on the video he said to the AI to execute an bash fork bomb but forgot to execute it, does anybody knows if it is possible to execute an js forkbomb like this one **(function f() { require('child_process').spawn(process.argv[0], ['-e', '(' + f.toString() + '());']); require('child_process').spawn(process.argv[0], ['-e', '(' + f.toString() + '());']); }());** and crash its server?
Aalbatroz4/25/2024

Communication with server and client <nextjs>

i have a webhook which calls nextjs api, can that api call do something which triggers an action on