Warn/Error if next is run without cacheComponents: true if the site was built with cacheComponents: true
#86314
webmonarch
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
cacheComponents: true, deploy somehow and either (1) forgetting to include the proper configuration (or the configuration was not read for some reason (without TS)Non-Goals
Background
I spent a while debugging this issue where
cacheComponents: truedynamic pages would error when deployed on any call to a dynamic function (eg:await connection()). It took my a while to realize that my deploy process forgot to include thenext.configfile. (somewhat related, it deployed a production version of the app (no dev depdendencies so thenext.config.tswas read either.Once I realized that the app was build with
cacheComponents: trueand running with (effectivelycacheComponents: false), it dawned on me the issue.To be clear, this is user error, but I believe there is an opportunity for the docs and error messages to suggest this could be a cause.
Proposal
Update the docs per the above OR if possible, encode that the site was built with
cacheComponents: trueand fail if it is served with a different setting.Beta Was this translation helpful? Give feedback.
All reactions