-
Notifications
You must be signed in to change notification settings - Fork 0
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
TypeError: Cannot read property 'getInitialProps' of undefined #1808
Comments
async function f(e, t) {
let r = t.res || t.ctx && t.ctx.res;
if (!e.getInitialProps) // error is thrown here
return t.ctx && t.Component ? {
pageProps: await f(t.Component, t.ctx)
} : {};
let n = await e.getInitialProps(t);
if (r && u(r))
return n;
if (!n) {
let t = '"' + s(e) + '.getInitialProps()" should resolve to an object. But found "' + n + '" instead.';
throw Error(t)
}
return n
} |
errors appears around the time #1726 was merged. seems possible its not coincidental |
possibly related vercel/next.js#36221 |
Given this comment and the fact that Next.JS 13 enabled swcMinify by default, turning off swcMinify would be a good test. |
@federicobadini it seems like the error is still happening after updating next js. how do you feel about moving forward with #1846? |
Yes, let's try that option too. |
It seems that the error is still present, so it must not be linked to swc either. |
@federicobadini while it doesn't fix this error it did seem to fix #1797 so i think we should leave this for now. |
Oh, that's good. So maybe that was swc related while this wasn't. |
Sentry Issue: REACT-COMMERCE-2F6
The text was updated successfully, but these errors were encountered: