DynamicServerError: Dynamic server usage: Page couldn't be rendered statically because it used `head
Unanswered
American Kestrel posted this in #help-forum
American KestrelOP
I get this error and I know which file is causing it, it uses edge runtime.
I tried making the fetch call from useEffect, then from a getServerSideProps function.
It works on localhost, but when deployed to production, I get the error. How can I fix this, its been over a day of trying and nothing is working.
I tried making the fetch call from useEffect, then from a getServerSideProps function.
It works on localhost, but when deployed to production, I get the error. How can I fix this, its been over a day of trying and nothing is working.
2 Replies
Duplicate post of:
https://nextjs-forum.com/post/1177877135864639599
https://nextjs-forum.com/post/1177877135864639599
put export const dynamic = 'force-static' to the page or find out why would you call
header() on the static page