Zum Inhalt springen
This is an unmaintained snapshot of the Astro v4 docs. View the latest docs.

Invalid value returned by getStaticPaths.

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

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

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

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

See Also:

Wirke mit

Worum geht es?

Community