-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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 getStaticProps error (#10619)
* Add err.sh for getStaticProps error * Prettify error Co-authored-by: Joe Haddad <[email protected]>
- Loading branch information
Showing
4 changed files
with
22 additions
and
4 deletions.
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,17 @@ | ||
# Invalid unstable_getStaticProps Return Value | ||
|
||
#### Why This Error Occurred | ||
|
||
In one of the page's `unstable_getStaticProps` the return value had the incorrect shape. | ||
|
||
#### Possible Ways to Fix It | ||
|
||
Make sure to return the following shape from `unstable_getStaticProps`: | ||
|
||
```js | ||
export async function unstable_getStaticProps() { | ||
return { | ||
props: { [key: string]: any } | ||
} | ||
} | ||
``` |
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
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
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