Skip to content

Commit

Permalink
Update docs for Prerender Error message (#30044)
Browse files Browse the repository at this point in the history
Update docs to mention `undefined` doesn't work, use `null` instead
  • Loading branch information
styfle committed Oct 18, 2021
1 parent 74ff911 commit 0daaae3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion errors/prerender-error.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ While prerendering a page an error occurred. This can occur for many reasons fro
#### Possible Ways to Fix It

- Make sure to move any non-pages out of the `pages` folder
- Check for any code that assumes a prop is available even when it might not be. e.g., have default data for all dynamic pages' props.
- Check for any code that assumes a prop is available, even when it might not be
- Set default values for all dynamic pages' props (avoid `undefined`, use `null` instead so it can be serialized)
- Check for any out of date modules that you might be relying on
- Make sure your component handles `fallback` if it is enabled in `getStaticPaths`. [Fallback docs](https://nextjs.org/docs/basic-features/data-fetching#the-fallback-key-required)
- Make sure you are not trying to export (`next export`) pages that have server-side rendering enabled [(getServerSideProps)](https://nextjs.org/docs/basic-features/data-fetching#getserversideprops-server-side-rendering)

0 comments on commit 0daaae3

Please sign in to comment.