-
Hey there, I got a problem with next.js on firebase functions/hosting and was wondering why modules used in getStaticProps() are bundled in the final static output. In my getStaticProps() functions I load, transform and store images from a headless cms. I thought, next will do this only during build phase and only once. After this all the code within the getStaticProps() is not required anymore. But if I go to the dist folder I can see that there is a pagename.js where all the modules from my getStaticProps() are required. The firebase problem: Testing, Building and even emulating with firebase emulators works great. Only the deployed version throws internal server errors, complaining that a required module is missing. And that module is used within getStaticProps(), that's why I'm having a really hard time to debug this issue. Can someone explain what I'm doing something wrong? :( |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Are you sure you're not looking at the server bundle? Be sure you're in the client directory. Can you please share your full page file? |
Beta Was this translation helpful? Give feedback.
Are you sure you're not looking at the server bundle? Be sure you're in the client directory.
Can you please share your full page file?