-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't resolve 'node:tty' with @sentry/nextjs #4458
Comments
Hi, @magnattic - thanks for writing in!
I believe you're correct and sentry-javascript/packages/utils/src/node.ts Lines 8 to 20 in 1792a5b
I suspect that this is another version of this bug or this one. (More discussion here and here and here.) The upshot is that one of these lines (1, 2) in the next.js webpack config ought to be handling this. I'm not going to close this yet, but I think perhaps the issue is on their end, and somehow one or both of those lines aren't executing or aren't working. Would you mind please raising this with them? Feel free to reference this issue, and I'll follow along there as well. |
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 "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Hi, I think I am hitting a similar issue with sentry Next, but only during test in Cypress.
|
Package + Version
Version:
Description
I get the following error message when I start up my nextjs server:
Here is the
sentry.ts
file in question that is causing this error:My
sentry.client.config.js
andsentry.server.config.js
look pretty much like described in the docs.My setup:
yarn 3.1.1 (with pnp)
nextjs 12.0.8
What I've tried
I have the supspicion this might be an issue with webpack 5 being used in nextjs which is not including node polyfills anymore. I am not sure why sentry would access tty or process in the browser, but it looks like that might be the issue here.
So in the
next.config.js
I tried to set a polyfill like this (after installing the corresponding package):Which did not solve the problem.
I am confused as to why this is even happening, I would assume that sentry only accesses node packages while in an node environment?
The text was updated successfully, but these errors were encountered: