-
-
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
Next.js 13 with app router: "require function is used in a way in which dependencies cannot be statically extracted" #9120
Comments
Can confirm, this only happens in 7.71.0+ |
Same log:
next.js: 13.5.3 |
I can see how that is happening. I don't think this warning has any critical impact as of now. |
Is there a way to silence this warning? |
While it may not have a critical impact it does hurt the developer experience and discourage folks from upgrading. I would really love someone’s thoughts on when this will be addressed. |
@alvarlagerlof Since this is webpack emitting the warning, probably, but not from within the SDK.
@subvertallchris I can't say. 1 week? 2 weeks? You could turn off the SDK in dev mode if your developer experience is massively impacted. |
I have done the following to ignore the warning (hopefully an update will fix this entirely), ref - https://medium.com/tomincode/hiding-critical-dependency-warnings-from-webpack-c76ccdb1f6c1:
|
Hi everybody, we just released version |
I just tried it out and it's working great! Thanks for the fix. |
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
7.71.0
Framework Version
Next.js 13.5.3-canary.3
Link to Sentry event
No response
SDK Setup
Steps to Reproduce
import * as Sentry from '@sentry/nextjs';
to a fileExpected Result
The code should be imported with no side-effects in the log.
Actual Result
With
lib/reportError.ts
defined as such:Importing it results in the following appearing every time in my dev console.
The text was updated successfully, but these errors were encountered: