next.js icon indicating copy to clipboard operation
next.js copied to clipboard

og-image doesn't work with output file tracing

Open youssefm opened this issue 1 year ago • 4 comments

Steps to repro:

  1. Create a new next js project
  2. Install @vercel/og
  3. Add an og-image API page at: pages/api/og.tsx
  4. Add output: "standalone", to your next.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'] {

youssefm avatar Oct 13 '22 02:10 youssefm

Wrong repo

youssefm avatar Oct 13 '22 04:10 youssefm

Same here

marviobezerra avatar Oct 30 '22 23:10 marviobezerra

Is there any update on this?

Saul-BT avatar Nov 04 '22 09:11 Saul-BT

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!

ijjk avatar Nov 04 '22 23:11 ijjk

Closing as duplicate of #39275

balazsorban44 avatar Nov 15 '22 17:11 balazsorban44

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.

github-actions[bot] avatar Dec 16 '22 00:12 github-actions[bot]