Next.js Discord

Discord Forum

metadataBase Not working

Unanswered
Red carpenter ant posted this in #help-forum
Open in Discord
Avatar
Red carpenter antOP
what am I doing wrong? The metadataBase error won't go. Even in vercel deployment log.

PS: this screenshot is from/app/(website)/layout.tsx

I have opengraph-image.jpg in /app

Next version: v14.0.1
Image

9 Replies

Avatar
Red carpenter antOP
bump
Avatar
Asian black bear
Hello, did you find a solution?
Avatar
Red carpenter antOP
nope
Avatar
you also need to set it in opengraph.
Avatar
Asian black bear
like how to set it in opengraph? In the opengraph-image.js file?
Avatar
Red carpenter antOP
yeah, I am using the image. the docs doesn't explain it well.
Avatar
Asian black bear
For me I only set up the opengraph in the generateMetadata function and I deleted the opengraph-image.js file.
openGraph: {
title: data[0].attributes.title,
url: ${process.env.NEXT_PUBLIC_BASE_URL}/${params.lang}/post/${params.slug},
images: {
url: https://my_api.com${data[0].attributes.main_image.data.attributes.url},
},
type: "website",
},
};
Something like that. I wish it will help you. I didn't find any other solution.