Sentry doing nothing on a NextJS application run within NX
See original GitHub issueIs 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?
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 thewithSentryConfig
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 thatSentry.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
Issue Analytics
- State:
- Created 10 months ago
- Reactions:6
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Troubleshooting for Next.js - Sentry Documentation
If your application started to misbehave because of performing additional OPTIONS requests, it is most likely an issue with unwanted sentry-trace request ...
Read more >@nrwl/next | Nx
Scaffolding for creating, building, serving, linting, and testing Next.js applications. Integration with building, serving, and exporting a Next.js application.
Read more >Module not found: Can't resolve 'fs' in Next.js application
The solution was to go to the node. js web page, download the latest version and just install it. And then re-run the...
Read more >How to Build a Monorepo with Nx, Next.js and TypeScript
js applications and React component libraries. It will also help us in running a development web server with hot module reload. It can...
Read more >How to Build Scalable Architecture for your Next.js Project
How to Build a Complete Next.js App (2 Part Series) ... didn't specifically say anything about yarn , we do that in package.json...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Here’s the reproduction repository: https://github.com/jporsay/sentry-nx-issue
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it
Status: Backlog
orStatus: In Progress
, I will leave it alone … forever!“A weed is but an unloved flower.” ― Ella Wheeler Wilcox 🥀