getStaticPath 返回值中的条目无效
InvalidGetStaticPathsEntry:getStaticPaths 返回的条目无效。期待一个对象,得到
ENTRY_TYPE
¥InvalidGetStaticPathsEntry: Invalid entry returned by getStaticPaths. Expected an object, got
ENTRY_TYPE
什么地方出了错?
Section titled 什么地方出了错?¥What went wrong?
getStaticPaths
的返回值必须是一个对象数组。在大多数情况下,发生此错误是因为返回了数组的数组。使用 .flatMap()
或 .flat()
调用可能会有用。
¥getStaticPaths
’s return value must be an array of objects. In most cases, this error happens because an array of array was returned. Using .flatMap()
or a .flat()
call may be useful.
也可以看看:
¥See Also:
Error Reference