| title | Invalid entry inside getStaticPaths()'s return value. |
|---|---|
| i18nReady | true |
| githubURL | https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts |
import DontEditWarning from '~/components/DontEditWarning.astro'
InvalidGetStaticPathsEntry: Invalid entry returned by
getStaticPaths(). Expected an object, gotENTRY_TYPE.
getStaticPaths()'s return value must be an array of objects. In most cases, this error happens because an array of arrays was returned. Using .flatMap() or a .flat() call may be useful.
export async function getStaticPaths() {
return [ // <-- Array
{ params: { id: "blog" } }, // <-- Object
{ params: { id: "about" } }
];
}See Also: