컨텐츠로 이동

Invalid value returned by getStaticPaths.

이 컨텐츠는 아직 번역되지 않았습니다.

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.

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

See Also: