How to get setup and deploy Jobs for your Next.js project
maxDuration
for your Vercel Serverless Functions.
/api/trigger
endpoint, which needs to be exposed to the Trigger.dev installation (either your self-hosted one or the Trigger.dev Cloud).
To make sure you aren’t matching the /api/trigger
route in your middleware, check your config.matcher
export:
/api/trigger
so there won’t be an issue here. But the following middleware.ts file will cause conflicts with Trigger.dev
"/(api|trpc)(.*)"
matches anything starting with api
, which matches /api/trigger
. You can add a negative-lookahead pattern to the matcher to exclude the /api/trigger
route:
/api
except for /api/trigger
.
If you want to match all routes except for /api/trigger
, you can use the following matcher:
/api/trigger
to the publicRoutes
, like so:
Module parse failed: Identifier 'NextResponse' has already been declared .
This error is caused by version 13.4.4. For further information, please visit