getStaticProps JSON file contains HTML of rendered page
See original GitHub issueBug report
Describe the bug
When deploying on Vercel, all my pages which define getStaticProps
cannot be loaded client-side because their static-props JSON file at _next/data/<HASH>/<page>.json
contains the rendered HTML of the page, instead of the static props. Because of this, the router forces a hard navigation.
To Reproduce
With humility, I must admit I cannot find the reason for which this is happening – and I cannot describe how to reproduce it.
Expected behavior
The getStaticProps
JSON file should contain JSON, not HTML.
Screenshots

System information
- Version of Next.js: 10.0.2
- Deployment: Vercel
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Data Fetching: getStaticProps - Next.js
The page must be pre-rendered (for SEO) and be very fast — getStaticProps generates HTML and JSON files, both of which can be...
Read more >Why is a JSON file generated when calling getStaticProps in ...
My question is, why is this JSON file needed? If the page is rendered into static HTML at build time using the props...
Read more >Next.js (useStaticProps, useStaticPaths) + Static JSON Data
I have been trying to learn Next.js for a few weeks now. I have read a few blogs and have found Next.js very...
Read more >Rendering Non-React Component (HTML/JSON page) #14991
I'm creating a Salesforce Custom UI and the conventions for this as indicated in their official docs is to have rootUrl/index.html & rootUrl/ ......
Read more >Static Site Generation (SSG) in Next.js with `getStaticProps`
In this lesson, we will import a JSON file from the file system in the getStaticProps life-cycle method of a Table of Contents...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Everything works just right. Thanks a bunch!
Hi, this should be corrected now, please re-deploy your application and give it a try!