Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 1.08 KB

invalid-get-static-paths-return.mdx

File metadata and controls

34 lines (25 loc) · 1.08 KB
title i18nReady githubURL
Invalid value returned by getStaticPaths.
true

import DontEditWarning from '~/components/DontEditWarning.astro'

InvalidGetStaticPathsReturn: Invalid type returned by getStaticPaths. Expected an array, got RETURN_TYPE

What went wrong?

getStaticPaths's return value must be an array of objects.

export async function getStaticPaths() {
	return [ // <-- Array
		{ params: { slug: "blog" } },
		{ params: { slug: "about" } }
	];
}

See Also: