proper path in vercel.json for next app router api route
Unanswered
Gharial posted this in #help-forum
GharialOP
Having trouble getting vercel to apply the settings in the vercel.json to the api route.
This is a NextJS App router project. The full project path for that file is
<projectRoot>/src/app/api/sync/pull/route.ts
When I configure my vercel.json like this, vercel builds fine, but when I inspect the functions for the deployment, it's just the normal 1G memory and 15s timeout. We have a Pro plan so these should be valid values. I tried removing app from the path and then vercel fails to build. Any thoughts?
And this may be more a vercel issues than Next. if I need to ask this elsewhere just let me know.
This is a NextJS App router project. The full project path for that file is
<projectRoot>/src/app/api/sync/pull/route.ts
When I configure my vercel.json like this, vercel builds fine, but when I inspect the functions for the deployment, it's just the normal 1G memory and 15s timeout. We have a Pro plan so these should be valid values. I tried removing app from the path and then vercel fails to build. Any thoughts?
And this may be more a vercel issues than Next. if I need to ask this elsewhere just let me know.
{
"functions": {
"app/api/sync/pull/route.ts": {
"memory": 3009,
"maxDuration": 120
}
},1 Reply
GharialOP
ah, I need the FULL path.
src/app/api/sync/pull/route.ts
It's confusing that Vercel was able to find the path without src but then didn't apply the config.
src/app/api/sync/pull/route.ts
It's confusing that Vercel was able to find the path without src but then didn't apply the config.