blomqma / next-rest-framework

Type-safe, self-documenting APIs for Next.js
https://next-rest-framework.vercel.app
Other
136 stars 18 forks source link

fix: Next REST Framework encountered an error: Error: Dynamic server usage: Page couldn't be rendered statically because it used `headers`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error #120

Closed mr-kelly closed 7 months ago

mr-kelly commented 7 months ago

When I run next build, a error happend, but Next build success:

image

Anything I can do with it?

blomqma commented 7 months ago

This is a known issue that I was able to reproduce recently, trying to get it fixed ASAP

blomqma commented 7 months ago

This should be fixed in v5.0.0, could you check if upgrading to that fixes your issue, thanks: https://github.com/blomqma/next-rest-framework/releases/tag/v5.0.0