next.js
next.js copied to clipboard
og-image doesn't work with output file tracing
Steps to repro:
- Create a new next js project
- Install
@vercel/og
- Add an og-image API page at:
pages/api/og.tsx
- Add
output: "standalone",
to yournext.config.js
Try to run next build
to get the following output:
warn - You are using an experimental edge runtime, the API might change.
info - Creating an optimized production build .<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (176kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
info - Creating an optimized production build
info - Compiled successfully
> Build error occurred
[Error: ENOENT: no such file or directory, open '/.../.next/server/pages/api/og.js.nft.json'] {
Wrong repo
Same here
Is there any update on this?
Hi, in the latest version of Next.js v13.0.2
this is no longer a fatal error and will not block the build. We will investigate further why this file lookup is failing as well!
Closing as duplicate of #39275
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.