bozobit
PPrisma
•Created by bozobit on 1/27/2025 in #help-and-questions
Intermittent Server Error with Prisma 6.2.1 with Node 22 on Linux Mint
Ah! I figured it out. It turned out that this was a timeout error when connecting to a remote database that was far from me. I am in Auckland and the database was in the USA. Once I switched the database (Neon) to Sydney, the problem resolved itself. However, i will say that the error message from Prisma was not very helpful! (see above) I discovered the issue by trying with Drizzle and it gave me a timeout message. That was the key to figuring it out. 😃
8 replies
PPrisma
•Created by bozobit on 1/27/2025 in #help-and-questions
Intermittent Server Error with Prisma 6.2.1 with Node 22 on Linux Mint
@Nurul (Prisma) Well, after replacing my Linux Mint OS with the latest LTS of Ubuntu, the intermittent error remained. I then downgraded to 5.22.0 and the intermttent problem remained. But when I run the same configuration on Windows 11, no problem! I'm really stuck here, and after using Prisma for over 2 years, I've lost some confidence that it will behave predictably. I think I'm going to explore Drizzle.
8 replies
PPrisma
•Created by bozobit on 1/27/2025 in #help-and-questions
Intermittent Server Error with Prisma 6.2.1 with Node 22 on Linux Mint
@Nurul (Prisma). An update. I found that there may be incompatibiliites between Prisma and Linux Mint in dev? Will be swithing to Ubuntu to see if that addresses the issue. When I run the same NextJS application in Dev on Windows 11, no problems.
8 replies
PPrisma
•Created by bozobit on 1/27/2025 in #help-and-questions
Intermittent Server Error with Prisma 6.2.1 with Node 22 on Linux Mint
Thanks @Nural(Prisma), Well, I looked up disabling HMR and that looked more difficult, so I just separately did an
pnpm build
and then pnpm start
to run the app without HMR. Then stringifying the error message gave me only an object like { digest: '520418415' }
with no other information. At first caused it to error out every time. Then I regenerated prisma with npx prisma generate
and then built and started again. After I did that, the intermittent problem stopped and I no longer get the error. I can now just run pnpm dev
and use the HMR and it appears to be fine. I really have no idea what I did or what caused this, but I'm just afraid it will come back. (Well, it did the next day!) FYI, here is my package.json file that I hope answers your quesiton on how I'm including prisma.{
"name": "@repo/database",
"version": "0.0.0",
"main": "./index.ts",
"types": "./index.ts",
"scripts": {
"analyze": "prisma generate --no-hints",
"build": "prisma generate --no-hints",
"clean": "git clean -xdf .cache .turbo dist node_modules",
"typecheck": "tsc --noEmit --emitDeclarationOnly false"
},
"dependencies": {
"@neondatabase/serverless": "^0.10.4",
"@prisma/adapter-neon": "^6.2.1",
"@prisma/client": "6.2.1",
"@t3-oss/env-nextjs": "^0.11.1",
"server-only": "^0.0.1",
"undici": "^7.3.0",
"ws": "^8.18.0",
"zod": "^3.24.1"
},
"devDependencies": {
"@repo/typescript-config": "workspace:*",
"@types/node": "22.10.7",
"@types/ws": "^8.5.14",
"bufferutil": "^4.0.9",
"prisma": "6.2.1",
"typescript": "^5.7.3"
}
}
8 replies
TTCTheo's Typesafe Cult
•Created by KingKorai 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 KingKorai 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 KingKorai 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 KingKorai on 4/8/2023 in #questions
Chirp Tutorial: tRPC failed on <no-path>:
looking at it...
47 replies
TTCTheo's Typesafe Cult
•Created by KingKorai 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 KingKorai 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 KingKorai 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 KingKorai on 4/8/2023 in #questions
Chirp Tutorial: tRPC failed on <no-path>:
Yes, windows
47 replies
TTCTheo's Typesafe Cult
•Created by KingKorai 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 KingKorai 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 KingKorai 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 KingKorai 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 KingKorai 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 KingKorai 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 KingKorai on 4/8/2023 in #questions
Chirp Tutorial: tRPC failed on <no-path>:
Yes.
47 replies
TTCTheo's Typesafe Cult
•Created by KingKorai 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