Did you provide BASE_URL Environment variable in Project? This worked for me:
export const metadata = {
metadataBase: new URL('http://localhost:3000'),
title: 'Title website',
description: 'this is the description'
openGraph: {
title: 'Title website',
description: 'this is the description',
image: 'url/image.png'
},
twitter: {
card: 'summary_large_image',
site: '@vercel_support',
title: 'Title website',
description: 'this is the description',
image: 'url/image.png'
}
}
The error metadata.metadataBase is not set for resolving typically occurs when the base URL for metadata is not set, which is needed for resolving social open graph or Twitter images. This warning can appear when running in development mode (localhost), and it will fallback to “http://localhost:3000” if metadataBase is not set.