Next.js Discord

Discord Forum

Search Params causing issue for export output

Unanswered
Long-billed Dowitcher posted this in #help-forum
Open in Discord
Long-billed DowitcherOP
Hi,

I'm getting some build errors when using export as the output type where I'm using search params to access values to make an API call conditionally (otherwise there is a default value). However this is causing issues in terms of building with the following message:
 Generating static pages (0/4)StaticGenBailoutError: Page with `dynamic = "error"` couldn't be rendered statically because it used `searchParams.interval`

And then I get multiple SyntaxError: Unexpected token < in JSON at position 0 errors.

I tried taking out the export output and it build fines but I want to use export for my current use case.

Help would be much appreciated!

1 Reply

Sloth bear
did you manage to fix this? im facing the same issue 😦