Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/nextjs
SDK Version
7.21.1
Framework Version
No response
Link to Sentry event
No response
Steps to Reproduce
Given that we're using NX for our service, we cannot use the wizard to automatically configure our application, so we followed the manual steps and created all of the files within our application folder, apps/app (not the root of the repository).
Which means that is / is the root of the repository, we now have the following files in the following paths:
apps/app/sentry.client.config.js
apps/app/sentry.server.config.js
apps/app/.sentryclirc
apps/app/sentry.properties
We also:
- Modified the
next.config.js to add the withSentryConfig with extra values for Sentry (or the webpack plugin).
- Added the custom _error page.
We've added a console.log to both sentry.client.config.js and sentry.server.config.js to see if they're being called (trying to diagnose the symptom).
We've executed nx serve app from the root of the project.
Expected Result
- We can see the
console.log appear in the console of the client/server (confirming that Sentry.init has been executed).
- When performing an action that throws an error we expect it to see it reported in Sentry.
Actual Result
- No log appears
- No message from Sentry appears
- No error is reported
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/nextjs
SDK Version
7.21.1
Framework Version
No response
Link to Sentry event
No response
Steps to Reproduce
Given that we're using NX for our service, we cannot use the wizard to automatically configure our application, so we followed the manual steps and created all of the files within our application folder,
apps/app(not the root of the repository).Which means that is
/is the root of the repository, we now have the following files in the following paths:apps/app/sentry.client.config.jsapps/app/sentry.server.config.jsapps/app/.sentryclircapps/app/sentry.propertiesWe also:
next.config.jsto add thewithSentryConfigwith extra values for Sentry (or the webpack plugin).We've added a
console.logto bothsentry.client.config.jsandsentry.server.config.jsto see if they're being called (trying to diagnose the symptom).We've executed
nx serve appfrom the root of the project.Expected Result
console.logappear in the console of the client/server (confirming thatSentry.inithas been executed).Actual Result