Replies: 61 comments 1 reply
-
I found, if some function uses 'zlib' module in app.ts, and swcMinify=true in next.config.js, this error comes like above; If swcMinify=false, page is ok and no error. So then zlib will not be supported after next 12.1.0? |
Beta Was this translation helpful? Give feedback.
-
No, it's a bug of swc minifier. As there are so many minification rules, there are some bugs. I'll add this to my private task list |
Beta Was this translation helpful? Give feedback.
-
Seeing the same. Setting |
Beta Was this translation helpful? Give feedback.
-
@silentim 🙏 thank you, fixed my issues with opensea-js failing to build nextjs on vercel, also @C-E-Rios |
Beta Was this translation helpful? Give feedback.
-
Is this issue still the case? |
Beta Was this translation helpful? Give feedback.
-
Is this fixed in next 12.3? |
Beta Was this translation helpful? Give feedback.
-
@davidhanlonJCM I think so, but I can't verify as there's no input nor repro case. |
Beta Was this translation helpful? Give feedback.
-
@kdy1 upgrading to next 12.3 appears to have solved the issue for me. In my case the issue appeared when using next 12.1 with |
Beta Was this translation helpful? Give feedback.
-
in version v13, if I run production (npm run build && npm run start) version I get these errors. if dev - all fine :| |
Beta Was this translation helpful? Give feedback.
-
@DonikaV Can you provide a repro? |
Beta Was this translation helpful? Give feedback.
-
i've been getting the same errors in my sentry report. using next 12.3.1 I've already tried to disable swcMinify. i use getInitialProps once only in
My sentry report:
Consequently seems like some users are getting and others not. any ideas? |
Beta Was this translation helpful? Give feedback.
-
@rossignolli Can you try 12 canary? |
Beta Was this translation helpful? Give feedback.
-
No, the problem that I don't use anywhere any functions like getInitiallProps. I only use env vars. maybe it because of that, but in version 12* all works fine. In 13 no :| |
Beta Was this translation helpful? Give feedback.
-
Same :/ |
Beta Was this translation helpful? Give feedback.
-
Oh if disabling swcMinify does not work it's a different issue |
Beta Was this translation helpful? Give feedback.
-
It still occurs in the following environments.
I tried upgrading to the latest version of @sentry/nextjs 7.53, but it didn't help much. I don't think we've figured out exactly what the problem is yet. |
Beta Was this translation helpful? Give feedback.
-
Is anyone having the same issue with TRPC as a wrapper around their app? |
Beta Was this translation helpful? Give feedback.
-
Any update? Seems like a simple |
Beta Was this translation helpful? Give feedback.
-
Turns out my issue was related to import statements. I am using a mono repo which had a lot of circular dependencies causing the build to have problems but everything works fine after creating a dependency graph and moving things around |
Beta Was this translation helpful? Give feedback.
-
Leaving this comment for all those still experiencing the issue. Same as stated in this comment, I started to experience the issue right after adding Sentry to my Next v12 project. Changelog report for test: new RegExp(`^${escapeStringForRegex(pagesDirectory)}.*\\.(${pageExtensionRegex})$`), This change was significant in my case since my project contained both Not completely familiar with how sentry boostraps in Next but renaming my ps. after this renaming, my projects is ok even with latest |
Beta Was this translation helpful? Give feedback.
-
I also experienced this, but my project contained a |
Beta Was this translation helpful? Give feedback.
-
This started in one of our projects. I found a colleague had added (most likely auto-added on accident):
removing that fixed it |
Beta Was this translation helpful? Give feedback.
-
In my case the problem is fixed defining an |
Beta Was this translation helpful? Give feedback.
-
@dlvx , @JClackett and @rossignolli do any of you have an update on this or a workaround? My issue affects ios devices on browser "Mobile Safari UI/WKWebView" |
Beta Was this translation helpful? Give feedback.
-
Turns out I needed just enough time and headache to troubleshoot this.
|
Beta Was this translation helpful? Give feedback.
-
Hi everyone, I will be moving this to Thank you for all the different solutions and reports! If the issue continues to arise, I encourage folks to create a separate bug report for their issue. |
Beta Was this translation helpful? Give feedback.
-
Was this suggestion taken up in later versions of next? I don't see any downsides. In my case, it's happening in Safari based on my sentry reports. But, I can't repro it in Safari myself. Does anyone have tips in getting this to reproduce? I'll try version bumps, but based on this discussion, there seems to be a lot of reasons why this occurs across all versions of sentry and next. |
Beta Was this translation helpful? Give feedback.
-
This is happening to some of our users on Windows and Android. We're on next v14.2.1 and @sentry/nextjs 7.110.1 |
Beta Was this translation helpful? Give feedback.
-
Getting this same error in 2024: "TypeError: Cannot read properties of undefined (reading 'getInitialProps')" |
Beta Was this translation helpful? Give feedback.
-
I'm also getting this issue in my Sentry reports. "next": "^14.2.5", TypeError ?(chunks/main) Its happening at this line the chunk file. Here e is undefined. |
Beta Was this translation helpful? Give feedback.
-
Verify canary release
Provide environment information
next: 12.1.1-12.1.6-canary.2
react: 17.0.2 or 18.0.0
node: 14.19.1
system: windows
What browser are you using? (if relevant)
chrome 100.0.4896.88
How are you deploying your application? (if relevant)
next start
Describe the Bug
Expected Behavior
no error in console and display page content
To Reproduce
Then npm run build, everything is ok and built successfully.
Now npm run start, get error like this in console (see image attached) and there is nothing displaying in browser, just blank:
A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred
Error rendering page: TypeError: Cannot read properties of undefined (reading 'getInitialProps')
No error if next 12.1.0 and more lower version.
Beta Was this translation helpful? Give feedback.
All reactions