-
I've been scratching my head over this for a while. I've tried many angles, please can somebody help? I successfully generated .json for 1000 dynamic pages via
Can anybody please suggest a scenario that would cause getStaticProps to be hit at runtime as well as at build? Tomorrow, I will have to go digging through Next codebase to try and figure it out.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Is this locally, or in production? If locally, I believe Next.js will call |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply, this was both. However, this morning, I've fixed! I was wrong in my initial findings the pages were only hit once per request, indicating the initial lookup was failing. Upon looking at the 'with-typescipt' example I can see the generated pages in server are used. I cleared the cache and generated again and could see the bug.
but i should have been generating
Damn it. I should have spotted that. The cache is working correctly now, super fast pages and great lighthouse score. 😃 For anyone else looking for answers, check the generated pages in
|
Beta Was this translation helpful? Give feedback.
Thanks for the reply, this was both. However, this morning, I've fixed! I was wrong in my initial findings the pages were only hit once per request, indicating the initial lookup was failing.
Upon looking at the 'with-typescipt' example I can see the generated pages in server are used. I cleared the cache and generated again and could see the bug.
/[type]/[slug]
but i should have been generating
/[type]s/[slug]
Damn it. I should have spotted that. The cache is working correctly now, super fast pages and great lighthouse score. 😃
For anyone else looking for answers, check the generated pages in
.next/server/static/{hash}/pages