The build error shows that the webhook route is importing getWebhookSecret but the function is actually called getStripeWebhookSecret in lib/stripe.ts. Let me fix this import:
Now let me fix the import to use the correct function name:
Now I need to update the usage of this function in the webhook route:
Fixed! I updated the webhook route to use the correct function name getStripeWebhookSecret() instead of getWebhookSecret(). This was causing the build error. Your deployment should now succeed—commit and redeploy!
An error occurred during deployment. Please fix:
Running build in Washington, D.C., USA (East) – iad1
Build machine configuration: 4 cores, 8 GB
Cloning github.com/DealPatrol/RepoFuse (Branch: v0/colecollins763-2959-43e51b0d, Commit: 781059e)
Cloning completed: 592.000ms
Restored build cache from previous deployment (Eeu2yprKvmoGn1ok3jcAG65gTt46)
Running "vercel build"
Vercel CLI 54.9.0
Detected `pnpm-lock.yaml` version 9 generated by pnpm@10.x with package.json#packageManager pnpm@10.33.0
Installing dependencies...
Lockfile is up to date, resolution step is skipped
Already up to date
╭ Warning ─────────────────────────────────────────────────────────────────────╮
│ │
│ Ignored build scripts: @clerk/shared@4.14.0, sharp@0.34.5, │
│ unrs-resolver@1.11.1. │
│ Run "pnpm approve-builds" to pick which dependencies should be allowed │
│ to run scripts. │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
Done in 1s using pnpm v10.33.0
Detected Next.js version: 16.1.6
Running "pnpm run build"
> repofuse@0.1.0 build /vercel/path0
> next build
▲ Next.js 16.1.6 (Turbopack)
⚠ The "middleware" file convention is deprecated. Please use "proxy" instead. Learn more: https://nextjs.org/docs/messages/middleware-to-proxy
Creating an optimized production build ...
✓ Compiled successfully in 13.5s
Running TypeScript ...
Failed to compile.
Type error: Type 'typeof import("/vercel/path0/app/api/analyses/[id]/run/route")' does not satisfy the constraint 'RouteHandlerConfig<"/api/analyses/[id]/run">'.
Types of property 'POST' are incompatible.
Type '(req: NextRequest, { params }: { params: { id: string; }; }) => Promise<Response>' is not assignable to type '(request: NextRequest, context: { params: Promise<{ id: string; }>; }) => void | Response | Promise<void | Response>'.
Types of parameters '__1' and 'context' are incompatible.
Type '{ params: Promise<{ id: string; }>; }' is not assignable to type '{ params: { id: string; }; }'.
Types of property 'params' are incompatible.
Property 'id' is missing in type 'Promise<{ id: string; }>' but required in type '{ id: string; }'.
Next.js build worker exited with code: 1 and signal: null
ELIFECYCLE Command failed with exit code 1.
Error: Command "pnpm run build" exited with 1
The error is a Next.js 16 type compatibility issue. In Next.js 16, route parameters must be awaited since they're now a Promise. Let me fix the /app/api/analyses/[id]/run/route.ts file:
Now I'll fix the function signature to use Promise<{ id: string }> for the params and await it:
Now I need to update all other usages of params.id in the function to use the destructured id variable. Let me check if there are more:
Good, no more params.id usages. Now let me check if there are any other route files with the same issue:
Only one file needed updating. I've fixed the Next.js 16 type compatibility issue by updating the POST function in /app/api/analyses/[id]/run/route.ts to accept params as a Promise and awaiting it before use. This aligns with Next.js 16's new async params behavior. Your build should now succeed—commit and redeploy!
An error occurred during deployment. Please fix:
Running build in Washington, D.C., USA (East) – iad1
Build machine configuration: 4 cores, 8 GB
Cloning github.com/DealPatrol/RepoFuse (Branch: v0/colecollins763-2959-43e51b0d, Commit: a0adfee)
Cloning completed: 616.000ms
Restored build cache from previous deployment (Eeu2yprKvmoGn1ok3jcAG65gTt46)
Running "vercel build"
Vercel CLI 54.9.0
Detected `pnpm-lock.yaml` version 9 generated by pnpm@10.x with package.json#packageManager pnpm@10.33.0
Installing dependencies...
Lockfile is up to date, resolution step is skipped
Already up to date
╭ Warning ─────────────────────────────────────────────────────────────────────╮
│ │
│ Ignored build scripts: @clerk/shared@4.14.0, sharp@0.34.5, │
│ unrs-resolver@1.11.1. │
│ Run "pnpm approve-builds" to pick which dependencies should be allowed │
│ to run scripts. │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
Done in 1s using pnpm v10.33.0
Detected Next.js version: 16.1.6
Running "pnpm run build"
> repofuse@0.1.0 build /vercel/path0
> next build
▲ Next.js 16.1.6 (Turbopack)
⚠ The "middleware" file convention is deprecated. Please use "proxy" instead. Learn more: https://nextjs.org/docs/messages/middleware-to-proxy
Creating an optimized production build ...
> Build error occurred
Error: Turbopack build failed with 1 errors:
./app/api/stripe/webhook/route.ts:2:1
Export getWebhookSecret doesn't exist in target module
1 | import { NextRequest, NextResponse } from 'next/server'
> 2 | import { getWebhookSecret, getStripe, getPriceIdForPlan } from '@/lib/stripe'
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 | import { upsertSubscription, getSubscriptionByStripeCustomerId, getUserByGithubId, updateUserBilling } from '@/lib/queries'
4 | import { grantCredits, CREDITS } from '@/lib/credits'
5 | import type Stripe from 'stripe'
The export getWebhookSecret was not found in module [project]/lib/stripe.ts [app-route] (ecmascript).
Did you mean to import getStripeWebhookSecret?
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.
at <unknown> (./app/api/stripe/webhook/route.ts:2:1)
ELIFECYCLE Command failed with exit code 1.
Error: Command "pnpm run build" exited with 1