yarn build loading wrong urls for JSONs generated by `getStaticProps`
See original GitHub issueI’m getting 404 for all of json files. here is an example url that is being loaded: https://site.com/_next/data/m51z0HYNsWKDS2Wgohw7V/post/about-us.json, But there is no such directory data in .next dir.
I searched the directory and found that the json file is in .next/server/static/BUILD_ID/pages/posts/about-us.json
To Reproduce
Use getStaticProps and getStaticPaths
Run yarn build && yarn start
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
yarn build loading wrong urls for JSONs generated ... - GitHub
I'm getting 404 for all of json files. here is an example url that is being loaded: https://site.com/_next/data/m51z0HYNsWKDS2Wgohw7V/post/about ...
Read more >NextJS | getStaticProps fails on build - Stack Overflow
I have a problem with getStaticProps and Apollo GraphQL . Part of website is supposed ... I loaded slugs from wrong url i...
Read more >Data Fetching: getStaticProps - Next.js
When using Incremental Static Generation, getStaticProps will be executed in the background to generate the JSON needed for client-side navigation.
Read more >Nextjs app deployment failed, but nothing in logs - Render
Hello, since yesterday my builds always failing, but logs seems like everything is ok and also up is up and running in logs,...
Read more >Duplicate content and no default Next JS redirect from trailing ...
I have deployed next.js 11.1.0 test site and noticed that the redirect from trailing slash is not functional. Both URLs load creating duplicate...
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

@Timer I’m not proxy passing
.nextdirectory. I have create anassets.site.comwith a location oflocation /_nextwhich has an alias to/project/.next;. So nginx is serving next.js files directly. Do you recommend to proxy them too?/_next/datais mapped to build output, which is expected as per: https://github.com/zeit/next.js/blob/canary/packages/next/next-server/server/next-server.ts#L406-L446We have tests ensuring getStaticProps works fine with
next start