T3 stack issues with auth
Getting the following error. I can't find any resources online for it ```[next-auth][error][adapter_error_getSessionAndUser]
https://next-auth.js.org/errors#adapter_error_getsessionanduser Cannot read properties of undefined (reading 'findUnique') {
message: "Cannot read properties of undefined (reading 'findUnique')",
stack: "TypeError: Cannot read properties of undefined (reading 'findUnique')\n" +
' at getSessionAndUser (/home/hycord/code/typescript/web/banappeals/node_modules/@next-auth/prisma-adapter/dist/index.js:24:52)\n' +...
How to make MUI TimePicker use UTC? (I really need this help)
Hi guys, I've been killing myself trying to do this, and I would really appreciate it if someone could help me, because I'm going crazy and I have to do this asap....
I know a lot of you guys hate MUI, but if anyone can help me, please do.
I'm using a time picker, and I need that time picker to always show time in UTC to be in sync with the backend etc.
I'm using a dayjs adapter. This is my code:...
Server vs client components
I am building an app that lets users create an offers just like on amazon. Is it a better idea to fetch those offers on client side or server side? Or it depends on the scale of an application?
has Theo done a video on why T3 uses react and not svelte or vue?
Is there potential to see a T3 for sveltekit?
Question about React architecture and organizing files
Hi there! I recently finished a project with a team in which we used MUI for the styles. The project turned out working perfectly fine, but I wasn't really happy that we ended up with files of 200 300 lines of code. I think that MUI doesn't help since when you declare the styles, prettier makes each property a different line so you end up with a <Box> that is 10-15 lines long. This plus the logic of that component made these files big. Now, I have two questions regarding this:
- Should I create more components when the file gets too big, even if that component is not reusable? For example, let's say that I have a certain section of the page that is unique but is also very big, is it okay if I create multiple components for this section even if those components will only be used there? This would be in order to keep files more concise and organized
- Is it okay to abstract the logic of a component in a custom hook even if that hook is not reused later? So let's say that I create a custom hook to handle a certain form with some specific inputs, and I want to control those inputs in a way that is incompatible with other forms in the application. Is it bad practice if I create a custom hook that won't be reused later on? Just for the sake of abstracting the logic of a component and just importing the necessary things from the custom hook. This with the idea that will separate the concerns of the files and help in avoiding big 200 - 300 lines of code files.
Hopefully my questions were clear and not too newbie for this discord! Thanks ❤️...
Good idea to mix prisma and trpc on the [...nextauth].ts file or should call a function from
So I have something like this:
```ts
CredentialsProvider({
name: "credentials",
credentials: {...
Can someone help explain this code from the recent 'Dont migrate to tRPC' stream
On the stream at around the 2hr 07min mark Theo writes the following code:
const sendTweetToDiscord = async (
tweet: NonNullable<
inferAsyncReturnType<typeof getRecentTrashTweets>["data"]...
Custom admin CMS
Hey, say I have an app and I need a custom CMS I write to control its content, should I create a protected route in that app that leads to the CMS or should I go ct3app-turborepo and have 1 Next app and 1 Next admin app?
Issues with next google fonts
According to next docs, I applied config in _app. and tailwind.config.mjs, but this approach works badly, after some refresh app shows the expected font and sometimes the default font is displayed.
import { type AppType } from "next/app";
import { type Session } from "next-auth";
import { SessionProvider } from "next-auth/react";...
error on newly scaffolded app
I tried running a new project with ct3a but after doing npm run dev i got this error

Netlify – tRPC crashes after every deployment
Whenever I make any changes to
[trpc].ts, the website crashes for all users. Each user needs to refresh the page (sometimes more than once) to bypass this error.
The logs don't show any strange behavior other than this same message every time:
Task timed out after 10.02 seconds...

Import on interaction RadixUI Dialog
I started today playing with the radix ui primitives. Is there a way to lazy load on interaction the content of the dialog if the dialog is uncontrolled ?
Basically I want to load the code that displays a modal only if a user clicks the trigger (e.g. button)...
Is this git merge ok ?
I'm making a pull request(First time) to an oss and the reviewers told me to make some changes when I made my changes I noticed that I made a merge … is this ok, or should I undo it (which I'm struggling with it right now.) Also, I want to rename the commits.

Testing with Typescript
When writing tests for a Typescript project, should functions still be written with fail conditions in mind so they can be tested properly? Or are those tests pointless because the project is using TS?
Example: Testing a
getFirstDayOfWeek function takes a Date as an argument. Of course if a string is provided, the function will fail when it tries to getDay() on the string. Should I check if the date is an instanceof Date and return undefined if not? This can then be tested by providing something other than a Date.
I don't know how other developers on the (large) team will interact with the code I'm writing and thinking I should add the fail condition code, but it means a lot of the other code that uses this getFirstDayOfWeek function needs to suffer by expecting either a Date or undefined as a result of the function. ...Next Auth sessions not working in production only
Hey 👋
I run a monorepo with a nextjs app and an electron app in it. The authentication is through JWT, and it happens on the nextjs app. Then the session token gets send to the electron app. All of this is fine in development.
The problem comes when I deploy the nextjs app to Vercel, the sessions's don't work anymore. Even though the session token is sent through, it doesn't seem to find the session....

Module parse failed when npm run dev out of nowhere
So I have been developing my app, and running local was no issue yesterday. So today when I tried to "npm run dev" this error showed up. I have looked it up, tried some solutions, asked chat-gpt even but no shot, hoping someone else had this problem in here too. I am using t3 stack.

What are some good Auth services?
Im Looking for something, that is easy and fast to setup. What are some good ones other than Auth0?
