-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Labels
Package: nextjsIssues related to the Sentry Nextjs SDKIssues related to the Sentry Nextjs SDK
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 package are you using?
@sentry/nextjs
SDK Version
7.15
Framework Version
No response
Link to Sentry event
No response
Steps to Reproduce
clone https://github.com/a-ursino/nextjs-sentry-bug
yarn
yarn build
Verify errors in the build output.
However if I don't import the content of the homepage from src/pages/Homepage and just inline it in pages/index.ts everything works fine.
If I disable sentry from next.config.js, I can still import the content from src/pages/Homepage and the build works fine.
NOTE:
I've created the example website with
npx create-next-app@latest
npx @sentry/wizard -i nextjs
Expected Result
build to succeed
Actual Result
info - Linting and checking validity of types
info - Creating an optimized production build
info - Compiled successfully
info - Collecting page data ...TypeError: Cannot read property 'getInitialProps' of undefined
at Object.355 (/Users/xyz/dev/-personal/my-app/.next/server/pages/index.js:180:41)
AnfalHussain
Metadata
Metadata
Assignees
Labels
Package: nextjsIssues related to the Sentry Nextjs SDKIssues related to the Sentry Nextjs SDK
Projects
Status
No status