-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[Sentry/Next.js] Not working with Webpack 5 on Next.js 11 #3688
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
Comments
Hey thank you for reporting. Could you show us a copy of your next.config.js? That would help us start debugging this. |
sure:
|
@BjoernRave the sdk is not getting the sentry.server.config.js file
in my .env |
I actually had an error similar to this yesterday but it was caused by a cascading of errors from usage of |
UPDATE: This was caused by omitting the UPDATE: I've been seeing this before Next 11, so likely unrelated.
➜ client git:(main) yarn info next @sentry/nextjs
├─ @sentry/nextjs@npm:6.4.1
│ ├─ Instances: 1
│ ├─ Version: 6.4.1
└─ next@npm:11.0.0
├─ Instances: 1
├─ Version: 11.0.0 17:43:50.200 | info - Creating an optimized production build...
-- | --
17:44:45.352 | DEBUG 2021-06-17 00:44:45.352453210 +00:00 sentry-cli version: 1.64.2, platform: "linux", architecture: "x86_64"
17:44:45.353 | INFO 2021-06-17 00:44:45.352570245 +00:00 sentry-cli was invoked with the following command line: "/vercel/path0/node_modules/@sentry/cli/sentry-cli" "releases" "files" "9ec7e65e3fdb7ff3cc267e68fc4efd558e989c2a" "upload-sourcemaps" ".next/" "--ignore" "node_modules" "--ignore" "webpack.config.js" "--rewrite" "--strip-prefix" "webpack://_N_E/" "--url-prefix" "~/_next"
17:44:45.355 | error: .next/: IO error for operation on .next/: No such file or directory (os error 2)
17:44:45.356 | DEBUG 2021-06-17 00:44:45.356040706 +00:00 client close; no transport to shut down (from sentry)
17:44:45.356 | DEBUG 2021-06-17 00:44:45.356069663 +00:00 skipping update nagger because session is not attended
17:44:57.050 | DEBUG 2021-06-17 00:44:57.050514121 +00:00 sentry-cli version: 1.64.2, platform: "linux", architecture: "x86_64"
17:44:57.051 | INFO 2021-06-17 00:44:57.050590606 +00:00 sentry-cli was invoked with the following command line: "/vercel/path0/node_modules/@sentry/cli/sentry-cli" "releases" "files" "9ec7e65e3fdb7ff3cc267e68fc4efd558e989c2a" "upload-sourcemaps" ".next/" "--ignore" "node_modules" "--ignore" "webpack.config.js" "--rewrite" "--strip-prefix" "webpack://_N_E/" "--url-prefix" "~/_next"
17:44:57.053 | error: .next/: IO error for operation on .next/: No such file or directory (os error 2)
17:44:57.054 | DEBUG 2021-06-17 00:44:57.054078279 +00:00 client close; no transport to shut down (from sentry)
17:44:57.054 | DEBUG 2021-06-17 00:44:57.054112270 +00:00 skipping update nagger because session is not attended
17:44:59.605 | info - Compiled successfully |
I too was running into this issue and was able to work around it by tweaking @MatheusBueno's
I'm not sure why the default behavior of Sentry is not to use this path but it could very well just be the way I have my app structured, built (docker image), and hosted (Aliyun web services). |
I mistakenly posted on #3700 about a closely related issue. I'm receiving this error after updating to Next 11:
@joneath's solution would not work in my case, as even after deleting the cache and hard-upgrading everything, |
Realized my mistake in #3722 |
It works for me. Thanks~ |
@tm1000 If |
@mikestopcontinues I should have deleted that. I realized in #3722 that I was not following the directions! |
I have the same issue with webpack 5 and Next 11 after I upgraded |
@vaniyokk Interesting. I'm getting the issue on Node 14. Hopefully that helps a bit. |
Hi, all. We've changed our approach to injecting the SDK user's sentry config, and I believe that should render the above problems moot. I'm going to close this, but please do let us know if upgrading to the latest version (6.9.0 as of this writing, but likely to be 6.10.0 by EOD tomorrow) doesn't fix it. Cheers! |
When trying to start my app with next 11, where webpack 5 is enabled by default I get the following error:
Packages:
"@sentry/nextjs": "^6.7.1",
"next": "^11.0.0",
The text was updated successfully, but these errors were encountered: