getStaticPaths 路由上缺少 params 属性。
GetStaticPathsExpectedParams:
getStaticPaths路由上所需的params属性缺失或为空。¥GetStaticPathsExpectedParams: Missing or empty required
paramsproperty ongetStaticPathsroute.
什么地方出了错?
Section titled “什么地方出了错?”¥What went wrong?
getStaticPaths 指定的每个路由都需要 params 属性来指定匹配该路由所需的路径参数。
¥Every route specified by getStaticPaths require a params property specifying the path parameters needed to match the route.
例如,以下代码:
¥For instance, the following code:
---export async function getStaticPaths() { return [ { params: { id: '1' } } ];}---将创建以下路由:site.com/blog/1。
¥Will create the following route: site.com/blog/1.
也可以看看:
¥See Also:
Error Reference