-
-
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
Critical dependency warning with require-in-the-middle after upgrading to Sentry 8.52.0 in Next.js app #15209
Comments
Hi, we'll resolve this warning with the next release! |
Awesome, thanks @lforst! |
Hi @lforst, Since upgrading to @sentry/[email protected], I’m encountering the same "require-in-the-middle" Critical Dependency Warning in Next.js. I saw that you mentioned a fix is planned for the next release. For the interim solution, could you clarify: 1️⃣ Which is the latest stable release that does not have this issue? Should we downgrade to @sentry/[email protected], or is there a better version? 2️⃣ Would you recommend suppressing the warning using "ignoreWarnings" in next.config.js, or is downgrading a better approach? 3️⃣ What’s the estimated timeline for the fix in the next release? Thanks in advance for your help! (cc: @getsantry @danielkoller) |
@sousounibajis just jumping in for Luca real quick:
|
Sorry for the troubles everyone! |
Hey, I'm getting the same error using
|
@colaquecez does 8.52.1 fix it for you? |
Hey @Lms24, it doesn't:
|
thanks for the notice, I reopened the issue and will take another look |
8.52.1 fixed it for me, thanks! |
I had this problem yesterday and it seemed to be an issue with |
Hmm so I can't reproduce this on Here's my reproduction attempt: https://github.com/Lms24/gh-sentry-javascript-15209-next-dep-warning @colaquecez can you check your lock file if all Sentry packages were updated to EDIT: I meant |
Hey @Lms24, I reverted my yarn.lock file, and now everything is working again. It looks like one of the dependencies was causing the issue. I'll investigate it later. Thanks a lot for your help! |
Glad to hear it's working now! Then I'll close the issue again. Please let me know if anyone is still experiencing this warning. |
I can confirm that changing the version from 8.52.0 -> 8.52.1 fixes the problem. |
Just found this thread while googling my error. I used to have the one outlined above. After updating to v8.52.1 it is the following now: ./node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@opentelemetry/instrumentation/build/esm/platform/node
Package require-in-the-middle can't be external
The request require-in-the-middle matches serverExternalPackages (or the default list).
The request could not be resolved by Node.js from the project directory.
Packages that should be external need to be installed in the project directory, so they can be resolved from the output files.
Try to install it into the project directory by running npm install require-in-the-middle from the project directory. The fix outlined in the Vercel Issues area did not work for me (vercel/next.js#68805 (comment))
Let me know if you need more info. |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
8.52.0
Framework Version
React 19.0.0 & Next.js 15.1.6
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
Expected Result
No critical dependency warnings during development server startup.
Actual Result
The text was updated successfully, but these errors were encountered: