)}.getInitialProps()" is defined as an instance method - visit https://err.sh/zeit/next.js/get-initial-props-as-an-instance-method for more information.`
thrownewError(message)
}
...
...
@@ -252,11 +252,17 @@ export async function loadGetInitialProps<
@@ -264,7 +270,7 @@ export async function loadGetInitialProps<
if(!props){
constmessage=`"${getDisplayName(
Component
App
)}.getInitialProps()" should resolve to an object. But found "${props}" instead.`
thrownewError(message)
}
...
...
@@ -273,7 +279,7 @@ export async function loadGetInitialProps<
if(Object.keys(props).length===0&&!ctx.ctx){
console.warn(
`${getDisplayName(
Component
App
)} returned an empty object from \`getInitialProps\`. This de-optimizes and prevents automatic static optimization. https://err.sh/zeit/next.js/empty-object-getInitialProps`