bozobit
bozobit
TTCTheo's Typesafe Cult
Created by Luc Ledo on 4/8/2023 in #questions
Chirp Tutorial: tRPC failed on <no-path>:
It's working the public paths and, more important, I think I understand it now. Protecting the API path was not something on my radar! THANK YOU.
47 replies
TTCTheo's Typesafe Cult
Created by Luc Ledo on 4/8/2023 in #questions
Chirp Tutorial: tRPC failed on <no-path>:
I have many different versions of the trpc.ts and middleware.ts files! Let me sort through this for a few mins. THANK YOU.
47 replies
TTCTheo's Typesafe Cult
Created by Luc Ledo on 4/8/2023 in #questions
Chirp Tutorial: tRPC failed on <no-path>:
Yeah, that line... (just noticed it.)
47 replies
TTCTheo's Typesafe Cult
Created by Luc Ledo on 4/8/2023 in #questions
Chirp Tutorial: tRPC failed on <no-path>:
looking at it...
47 replies
TTCTheo's Typesafe Cult
Created by Luc Ledo on 4/8/2023 in #questions
Chirp Tutorial: tRPC failed on <no-path>:
Add the logic for the private procedure seemed to break it and give me the TRPC fail message that Appstein reported.
47 replies
TTCTheo's Typesafe Cult
Created by Luc Ledo on 4/8/2023 in #questions
Chirp Tutorial: tRPC failed on <no-path>:
Yes. It's the first simple example in Theo's demo. That's where I got stuck.
47 replies
TTCTheo's Typesafe Cult
Created by Luc Ledo on 4/8/2023 in #questions
Chirp Tutorial: tRPC failed on <no-path>:
was too long for discord
47 replies
TTCTheo's Typesafe Cult
Created by Luc Ledo on 4/8/2023 in #questions
Chirp Tutorial: tRPC failed on <no-path>:
Yes, windows
47 replies
TTCTheo's Typesafe Cult
Created by Luc Ledo on 4/8/2023 in #questions
Chirp Tutorial: tRPC failed on <no-path>:
const publicPaths = ["/", "/sign-in", "/sign-up", "/_SANDBOX/PageB*"];
47 replies
TTCTheo's Typesafe Cult
Created by Luc Ledo on 4/8/2023 in #questions
Chirp Tutorial: tRPC failed on <no-path>:
I had to comment out the second reference to userId and got it to work. this is returned (multiple times) { apiKey: '', secretKey: 'sk_test', apiUrl: 'https://api.clerk.dev', apiVersion: 'v1', authStatus: 'signed-out', authMessage: undefined, authReason: 'standard-signed-out', jwtKey: '' }
47 replies
TTCTheo's Typesafe Cult
Created by Luc Ledo on 4/8/2023 in #questions
Chirp Tutorial: tRPC failed on <no-path>:
I'm just trying to figure out what is breaking it.
47 replies
TTCTheo's Typesafe Cult
Created by Luc Ledo on 4/8/2023 in #questions
Chirp Tutorial: tRPC failed on <no-path>:
Will give it a go. FYI. I have a previous version of this that works, but that is before Theo made the changes to the trpc.ts file in his video.
47 replies
TTCTheo's Typesafe Cult
Created by Luc Ledo on 4/8/2023 in #questions
Chirp Tutorial: tRPC failed on <no-path>:
export default withClerkMiddleware((request: NextRequest) => { console.log("CLERK MIDDLEWARE RUNNING") if (isPublic(request.nextUrl.pathname)) { console.log("RETURNING A PUBLIC PATH") return NextResponse.next(); } // if the user is not signed in redirect them to the sign in page. const { userId } = getAuth(request); if (!userId) { // redirect the users to /pages/sign-in/[[...index]].ts const signInUrl = new URL("/sign-in", request.url); signInUrl.searchParams.set("redirect_url", request.url); return NextResponse.redirect(signInUrl); } return NextResponse.next(); });
47 replies
TTCTheo's Typesafe Cult
Created by Luc Ledo on 4/8/2023 in #questions
Chirp Tutorial: tRPC failed on <no-path>:
I put a console.log statement in the withClerkMiddleware function inside middleware.ts, and when I cal the public procedure on a public path, I get this loop, but the TRPC (prisma) query never executes. CLERK MIDDLEWARE RUNNING RETURNING A PUBLIC PATH CLERK MIDDLEWARE RUNNING RETURNING A PUBLIC PATH CLERK MIDDLEWARE RUNNING CLERK MIDDLEWARE RUNNING RETURNING A PUBLIC PATH CLERK MIDDLEWARE RUNNING CLERK MIDDLEWARE RUNNING RETURNING A PUBLIC PATH CLERK MIDDLEWARE RUNNING CLERK MIDDLEWARE RUNNING RETURNING A PUBLIC PATH CLERK MIDDLEWARE RUNNING CLERK MIDDLEWARE RUNNING
47 replies
TTCTheo's Typesafe Cult
Created by Luc Ledo on 4/8/2023 in #questions
Chirp Tutorial: tRPC failed on <no-path>:
Yes.
47 replies
TTCTheo's Typesafe Cult
Created by Luc Ledo on 4/8/2023 in #questions
Chirp Tutorial: tRPC failed on <no-path>:
Sorry, but I'm not sure what you mean. I can try to figure that it out, but can you direct me?
47 replies
TTCTheo's Typesafe Cult
Created by Luc Ledo on 4/8/2023 in #questions
Chirp Tutorial: tRPC failed on <no-path>:
Hi @James Perkins , I had the exact same issue, but when I updated the middleware matcher as you suggested, it just kept calling the middleware in a loop and would never execute the public (prisma) procedure. Any thoughts?
47 replies