Preliminary Checks
Reproduction
https://github.com/devlopermitesh/Youtube
Publishable key
pk_test_bmljZS1jb3ctMzIuY2xlcmsuYWNjb3VudHMuZGV2JA
Description
🐛 Bug Report
When using @clerk/nextjs/webhooks with verifyWebhook(req) in an API route (app/api/users/webhook/route.ts), the build fails on Vercel (Next.js 15.3.4).
Even though the route is marked with:
exportconstdynamic="force-dynamic";exportconstruntime="edge";// OR even "nodejs"
TypeError: Cannotreadpropertiesofundefined(reading'query')
### Environment```Shell
System:
OS: Windows11
CPU: (4)x64Intel(R)Core(TM)i5-7200UCPU @ 2.50GHz
Memory: 8GBRAM
Binaries:
Node: 20.12.2
npm: 10.5.0
pnpm: 9.1.1
Browsers:
Chrome: 137.0.0.0
Edge: 123.0.0.0
npmPackages:
next: 15.3.4
@clerk/nextjs:4.0.0drizzle-orm: 0.28.2
@clerk/backend:4.0.0typescript: 5.4.2
Preliminary Checks
I have reviewed the documentation: https://clerk.com/docs
I have searched for existing issues: https://github.com/clerk/javascript/issues
I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
Reproduction
https://github.com/devlopermitesh/Youtube
Publishable key
pk_test_bmljZS1jb3ctMzIuY2xlcmsuYWNjb3VudHMuZGV2JA
Description
🐛 Bug Report
When using
@clerk/nextjs/webhookswithverifyWebhook(req)in an API route (app/api/users/webhook/route.ts), the build fails on Vercel (Next.js 15.3.4).Even though the route is marked with: