Closed salincakli closed 3 weeks ago
next: 15.0.0-rc.0 outstatic: 1.4.9 react: 19.0.0-rc
No response
vercel
this error occured right after adding a new api route:
As I suspected a prefetch I wrote a check for prefetch in the new function:
const isPrefetch = url.searchParams.get('prefetch') === 'true';
returning this json {message: "Prefetch request"} interrupts this request. I suppose that alternatively router option can be set.
Another User with this error wrote into the vercel help discussion forum:
https://github.com/orgs/vercel/discussions/6918
` Error in Function: /[...slug] [Error: ENOENT: no such file or directory, open '/var/task/outstatic/content/metadata.json'] { errno: -2, code: 'ENOENT', syscall: 'open', path: '/var/task/outstatic/content/metadata.json', digest: '2192603207' }`
https://outstatic-web.vercel.app/docs/getting-started#deploy-with-vercel
create nextjs /api/customFunction route.tsx
trying to render /[...slug] fails
Hi @salincakli,
I'd need more information here. Can you try adding export const dynamic = 'force-static' to your page?
export const dynamic = 'force-static'
Provide environment information
next: 15.0.0-rc.0 outstatic: 1.4.9 react: 19.0.0-rc
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
vercel
Describe the Bug
this error occured right after adding a new api route:
Workaround
As I suspected a prefetch I wrote a check for prefetch in the new function:
returning this json {message: "Prefetch request"} interrupts this request. I suppose that alternatively router option can be set.
Another User with this error wrote into the vercel help discussion forum:
Expected Behavior
Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://outstatic-web.vercel.app/docs/getting-started#deploy-with-vercel
To Reproduce
trying to render /[...slug] fails