Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

Please change to fallback: "blocking", or document why ISR does not work #46

Open
reebalazs opened this issue Aug 13, 2021 · 0 comments

Comments

@reebalazs
Copy link

reebalazs commented Aug 13, 2021

This caused me a lot of time to figure out. I assumed that ISR would be working out of the box with this example. However when I created a new article on a Vercel deployment, I got the following error:

ERROR	Error: Cannot find module '/var/task/frontend/.next/server/pages/article/[slug].js'

This happened when an article was added on the fly. Static regeneration fixed the problem, which indicated that this is a problem with serverless generation only.

I spent a lot of time trying to figure out what might cause this error, with no result... I did not assume that Incremental Static Regeneration does not work on the vanilla starter template. Clearly, I am just starting to explore nextjs, which is why this was hard to figure out - but people who try the starter are expected to be beginners, too.

My suggestion is: either change the code to fallback: "blocking". Or if there is any reason not to do this, please document clearly that "if you want to enable ISR in Next, you have to do these manual changes".

The fallback: "blocking" would be desirable in both the article and the category slug, for completeness.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant