Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add err.sh for invalid getStaticPaths return value (#10605)
* Add err.sh for invalid getStaticPaths return value * Update error link * Apply suggestions from code review Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
- Loading branch information
1 parent
61025b8
commit db445db
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Invalid unstable_getStaticPaths Return Value | ||
|
||
#### Why This Error Occurred | ||
|
||
In one of the page's `unstable_getStaticPaths` the return value had the incorrect shape. | ||
|
||
#### Possible Ways to Fix It | ||
|
||
Make sure to return the following shape from `unstable_getStaticPaths`: | ||
|
||
```js | ||
export async function unstable_getStaticProps() { | ||
return { | ||
paths: Array<string | { params: { [key: string]: string } }> | ||
} | ||
} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters