Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using? If you use the CDN bundles, please specify the exact bundle (e.g. bundle.tracing.min.js
) in your SDK setup.
@sentry/nextjs
SDK Version
7.36.0
Framework Version
nextjs 13.1.6
Link to Sentry event
No response
SDK Setup
No response
Steps to Reproduce
- Clone minimal reproduction repo here: https://github.com/biblioteksentralen/vercel-deploybug-reproduction
vercel build
(you need to link it to a new vercel-project, default config, should work out of the box)- Build error
Possible ways to fix build:
- rename the file /pages/apidoc/[version].tsx to something like /pages/doc/[version].tsx
- set
autoInstrumentServerFunctions: false
in next.config.js
Seems like Automatic Instrumentation in Sentry wraps this page as if it was an api-route, probably because it starts with "api".
Expected Result
Builds sucessfully
Actual Result
[ ] info - Generating static pages (0/4)
Error occurred prerendering page "/apidoc/[version]". Read more: https://nextjs.org/docs/messages/prerender-error
Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=%5Bobject%20Promise%5D for the full message or use the non-minified dev environment for full errors and additional helpful warnings.