Skip to content

Invalid value returned by a getStaticPaths path.

InvalidGetStaticPathParam: Invalid params given to getStaticPaths path. Expected an object, got PARAM_TYPE

The params property in getStaticPaths’s return value (an array of objects) should also be an object.

pages/blog/[id].astro
---
export async function getStaticPaths() {
return [
{ 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
京ICP备15031610号-99