Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

experimental_ppr with generateMetadata gives revalidation error #70391

Closed
1 task done
moparlakci opened this issue Sep 24, 2024 · 2 comments
Closed
1 task done

experimental_ppr with generateMetadata gives revalidation error #70391

moparlakci opened this issue Sep 24, 2024 · 2 comments
Labels
examples Issue/PR related to examples

Comments

@moparlakci
Copy link

moparlakci commented Sep 24, 2024

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

next info

Which example does this report relate to?

with-styled-components

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Describe the Bug

Error: Invalid revalidate configuration provided: 0 < 1
at NextNodeServer.renderToResponseWithComponentsImpl (/usr/src/app/node_modules/next/dist/server/base-server.js:1881:27)
at async NextNodeServer.renderPageComponent (/usr/src/app/node_modules/next/dist/server/base-server.js:2169:24)
at async NextNodeServer.renderToResponseImpl (/usr/src/app/node_modules/next/dist/server/base-server.js:2207:32)
at async NextNodeServer.pipeImpl (/usr/src/app/node_modules/next/dist/server/base-server.js:960:25)
at async NextNodeServer.handleCatchallRenderRequest (/usr/src/app/node_modules/next/dist/server/next-server.js:281:17)
at async NextNodeServer.handleRequestImpl (/usr/src/app/node_modules/next/dist/server/base-server.js:853:17)
at async invokeRender (/usr/src/app/node_modules/next/dist/server/lib/router-server.js:183:21)
at async handleRequest (/usr/src/app/node_modules/next/dist/server/lib/router-server.js:360:24)
at async requestHandlerImpl (/usr/src/app/node_modules/next/dist/server/lib/router-server.js:384:13)
at async Server.requestListener (/usr/src/app/node_modules/next/dist/server/lib/start-server.js:142:13)

Expected Behavior

Generating metadata as stated for given page

To Reproduce

/products/[slug]/page.tsx

export const dynamic = "force-dynamic";
export const experimental_ppr = true;


export async function generateMetadata(
	{ params: { domain } }: { params: { domain: string } },
	parent: ResolvingMetadata,
): Promise<Metadata> {
	// read route params
	const website = await getWebsite(domain); // fetch call with revalidate set to 60

	return {
		robots: {
			index: website.search_engine_indexing,
			follow: true,
			nocache: true,
			googleBot: {
				index: website.search_engine_indexing,
				follow: true,
				noimageindex: true,
				"max-video-preview": -1,
				"max-image-preview": "large",
				"max-snippet": -1,
			},
		},
	};
}


export default async function ProductPage({
	params: { domain, slug },
}: {
....
})
@moparlakci moparlakci added the examples Issue/PR related to examples label Sep 24, 2024
@moparlakci
Copy link
Author

nothing to do with "with-styled-components" example..

@samcx
Copy link
Member

samcx commented Sep 24, 2024

@moparlakci Please re-open this issue using the correct issue template!

@samcx samcx closed this as completed Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples Issue/PR related to examples
Projects
None yet
Development

No branches or pull requests

2 participants