fasm
fasm
Explore posts from servers
TTCTheo's Typesafe Cult
Created by fasm on 5/23/2023 in #questions
Clerk: auth() was called but it looks like you aren't using authMiddleware in your middleware file
I'm using the nextjs app dir, and my middleware is definitely being called:
export default authMiddleware({
afterAuth: async (auth, request, evt) => {
console.log("hello from middleware")
}
});


export const config = {
matcher: ["/((?!.*\\..*|_next).*)", "/", "/(api|trpc)(.*)"],
};
export default authMiddleware({
afterAuth: async (auth, request, evt) => {
console.log("hello from middleware")
}
});


export const config = {
matcher: ["/((?!.*\\..*|_next).*)", "/", "/(api|trpc)(.*)"],
};
But I still get the error that I'm not using authMiddleware when I use
import { UserButton, auth } from '@clerk/nextjs';

const user = auth()
import { UserButton, auth } from '@clerk/nextjs';

const user = auth()
Any suggestions?
13 replies
TTCTheo's Typesafe Cult
Created by fasm on 5/8/2023 in #questions
Error: backingFormData.forEach is not a function
anyone else seeing this when trying to use new nextjs server actions? Error: backingFormData.forEach is not a function
export default function Home() {
async function test() {
'use server'
console.log('test')
}
return (
<form action={test}>
<button>test</button>
</form>
)
}
export default function Home() {
async function test() {
'use server'
console.log('test')
}
return (
<form action={test}>
<button>test</button>
</form>
)
}
this is all I've changed from create-react-app@latest
3 replies
TTCTheo's Typesafe Cult
Created by fasm on 4/22/2023 in #questions
vercel preview domain alias
I’m trying to follow this guide to add an alias to my GitHub CI workflow: https://vercel.com/guides/how-to-alias-a-preview-deployment-using-the-cli But I always get an error that the deployment ID cannot be found. I get the same error when trying to run the same command locally against the preview URL. Anyone else faced this/know how to achieve this?
1 replies
TTCTheo's Typesafe Cult
Created by fasm on 4/19/2023 in #questions
TRPC function type per router
I know you can run your TRPC endpoint on vercel's edge, but does anyone know if I can run some routes on serverless and some on edge? Thanks
2 replies
TTCTheo's Typesafe Cult
Created by fasm on 4/13/2023 in #questions
Stop unnecessary vercel deployments in mono-repo
I have one repo which contains two vercel projects, with both projects linked to the same git branch. At the moment, if I make a change to one project, it triggers a redeployment of both. Is there a way (perhaps with GitHub actions) to only trigger builds for projects when certain sub directories have changed? Thanks!
4 replies
TTCTheo's Typesafe Cult
Created by fasm on 1/25/2023 in #questions
Vercel functions - python + node runtimes
I need to have some vercel functions in python, and I'd like to have them live in the same project as my nextjs app. In a clean T3 app, when I make a /api folder with a python handler, I get 404s on all other functions. I think it could have something to do with how the dynamic routes are handled (https://github.com/vercel/vercel/issues/3294), but I just wondered if anyone else has encountered this?
1 replies
TTCTheo's Typesafe Cult
Created by fasm on 12/12/2022 in #questions
next export
Hey all, I’m trying use next export to convert the t3 starter website into a static site. I’m getting the error “i18n support is not compatible…”. Anyone got any advice?
6 replies