getStaticPaths fallback fails only in production #13013
Replies: 1 comment
-
Does your What's not immediately clear about this feature is that The thing is that, during the normal build phase. It can read environment variables from the build context. But in the SSG phase, it can't and needs to read them from the runtime context. I do think that with the lines blurring between build-time and run-time, the Vercel team is trying to simplify this whole environment variables thing. They just need to update the API subsequently ;) Hope it helps |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I’ve got a fallback page that reads the file system for Markdown in getStaticProps. The fallback page works in dev, but in production, it shows the loading state while router.isFallback is true and then the server errors out. Here’s a typical error.
Am I using this feature wrong?
Beta Was this translation helpful? Give feedback.
All reactions