Skip to content

Invalid value returned by getStaticPaths.

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:

Contribute

What’s on your mind?

Create GitHub Issue

Quickest way to alert our team of a problem.

Community