ed.upton
ed.upton
TTCTheo's Typesafe Cult
Created by blaze_kush_ on 6/5/2023 in #questions
Tailwind changing causes error in next
Are you using app router or page router?
9 replies
TTCTheo's Typesafe Cult
Created by ed.upton on 6/4/2023 in #questions
Use Clerk `getAuth(req)` in a Zact server action
Do I need to pass down the action as a prop from my server components to client components like in the code example?
14 replies
TTCTheo's Typesafe Cult
Created by ed.upton on 6/4/2023 in #questions
Use Clerk `getAuth(req)` in a Zact server action
Yeah I'm calling it in a client component
14 replies
TTCTheo's Typesafe Cult
Created by ed.upton on 6/4/2023 in #questions
Use Clerk `getAuth(req)` in a Zact server action
Ahh cheers, although I'm getting this error:
- error Error: Clerk: auth() and currentUser() are only supported in App Router (/app directory).
If you're using /pages, try getAuth() instead.
Original error: Error: Invariant: Method expects to have requestAsyncStorage, none available
at eval (./src/app/actions.ts:35:76)
- error Error: Clerk: auth() and currentUser() are only supported in App Router (/app directory).
If you're using /pages, try getAuth() instead.
Original error: Error: Invariant: Method expects to have requestAsyncStorage, none available
at eval (./src/app/actions.ts:35:76)
14 replies
TTCTheo's Typesafe Cult
Created by Liam on 5/27/2023 in #questions
Refresh a RSC
Did you find a way of doing it any better?
10 replies
TTCTheo's Typesafe Cult
Created by Liam on 5/27/2023 in #questions
Refresh a RSC
Yeah I see what you mean
10 replies
TTCTheo's Typesafe Cult
Created by ed.upton on 5/27/2023 in #questions
Recursive References in TypeScript
It seems as though as long as there's not a circular import to the root, e.g. A -> index -> B -> A its fine
3 replies
TTCTheo's Typesafe Cult
Created by ed.upton on 5/27/2023 in #questions
Recursive References in TypeScript
I think the main problem here is that I have circular references across files, where A requires B where B may require A
3 replies
TTCTheo's Typesafe Cult
Created by Liam on 5/27/2023 in #questions
Refresh a RSC
You can put this towards the end of your server action
10 replies
TTCTheo's Typesafe Cult
Created by Liam on 5/27/2023 in #questions
Refresh a RSC
I have found that using revalidatePath("<the_path_of_your_page"); has been working pretty well. It doesn't refresh the page, but more re-runs the server parts whilst maintaining the state
10 replies
TTCTheo's Typesafe Cult
Created by ed.upton on 2/8/2023 in #questions
Get tRPC Connection Status
Yeah, that is probably a better option, I thought I should add it since I stopped the dev server then started to wonder why stuff wasn't working as expected, and it turns out the specific thing I was trying to do did not handle the query failing
9 replies
TTCTheo's Typesafe Cult
Created by ed.upton on 2/8/2023 in #questions
Get tRPC Connection Status
Yeah, that makes sense, so I guess the way to go is to have a ping query that I can call every second or so
9 replies
TTCTheo's Typesafe Cult
Created by ed.upton on 2/8/2023 in #questions
Get tRPC Connection Status
So when the server is no longer reachable I would like to notify the user and could be down to: - Lost internet connection - The t3 deployment having stopped
9 replies
TTCTheo's Typesafe Cult
Created by ed.upton on 2/5/2023 in #questions
Next Build Stops After Type Validations
After many hours debugging, I've found the cause and the solution: It seems that the aws-sdk NPM package is breaking deployment silently somehow, with a potential similar/equivalent problem mentioned in this post https://stackoverflow.com/questions/75107933/aws-sdk-contributes-to-build-error-uncaught-typeerror-e-is-not-a-constructor. The solution is to move to v3 of the JavaScript AWS SDK (https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html), which I have confirmed does not have the same issue when building.
2 replies
TTCTheo's Typesafe Cult
Created by ed.upton on 2/7/2023 in #questions
Next Build Works Locally, But Not on Server
After many hours debugging, I've found the cause and the solution: It seems that the aws-sdk NPM package is breaking deployment silently somehow, with a potential similar/equivalent problem mentioned in this post https://stackoverflow.com/questions/75107933/aws-sdk-contributes-to-build-error-uncaught-typeerror-e-is-not-a-constructor. The solution is to move to v3 of the JavaScript AWS SDK (https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html), which I have confirmed does not have the same issue when building.
2 replies