Failing to generate static pages with InstantSearchNext provider on demand #6555
Labels
Library: React InstantSearch ≥ 7
Issues in any of the react-instantsearch@7 packages (formerly named react-instantsearch-hooks)
Uh oh!
There was an error while loading. Please reload this page.
🐛 Current behavior
Running a full build works as expected, but attempting to render a page on demand in NextJS results in a 500 error with the following message:
[Error]: Dynamic server usage: Route / couldn't be rendered statically because it used
headers
. See more info here: https://nextjs.org/docs/messages/dynamic-server-error🔍 Steps to reproduce
Live reproduction
https://codesandbox.io/p/devbox/dreamy-moon-92jc4w
💭 Expected behavior
On demand page generation in NextJS works without throwing any errors
Package version
next 15.0.4, react-instantsearch-nextjs 0.4.4, algoliasearch 5.17.1, react-instantsearch 7.13.8
Operating system
No response
Browser
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: