In your `404.js` page you added `getInitialProps` or `getServerProps` which is not allowed as this prevents the page from being static and `404.js` is meant to provide more flexibility for a static 404 page. Having a static 404 page is the most ideal as this page can be served very often and if not static puts extra strain on your server and more invocations for serverless functions which increase the cost of hosting your site unnecessarily.
In your `404.js` page you added `getInitialProps` or `getServerSideProps` which is not allowed as this prevents the page from being static and `404.js` is meant to provide more flexibility for a static 404 page. Having a static 404 page is the most ideal as this page can be served very often and if not static puts extra strain on your server and more invocations for serverless functions which increase the cost of hosting your site unnecessarily.
@@ -26,8 +26,8 @@ export const PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder
...
@@ -26,8 +26,8 @@ export const PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder
exportconstSSG_GET_INITIAL_PROPS_CONFLICT=`You can not use getInitialProps with unstable_getStaticProps. To use SSG, please remove your getInitialProps`
exportconstSSG_GET_INITIAL_PROPS_CONFLICT=`You can not use getInitialProps with unstable_getStaticProps. To use SSG, please remove your getInitialProps`
exportconstSERVER_PROPS_GET_INIT_PROPS_CONFLICT=`You can not use getInitialProps with unstable_getServerProps. Please remove one or the other`
exportconstSERVER_PROPS_GET_INIT_PROPS_CONFLICT=`You can not use getInitialProps with unstable_getServerSideProps. Please remove one or the other`
exportconstSERVER_PROPS_SSG_CONFLICT=`You can not use unstable_getStaticProps with unstable_getServerProps. To use SSG, please remove your unstable_getServerProps`
exportconstSERVER_PROPS_SSG_CONFLICT=`You can not use unstable_getStaticProps with unstable_getServerSideProps. To use SSG, please remove your unstable_getServerSideProps`
exportconstPAGES_404_GET_INITIAL_PROPS_ERROR=`\`pages/404\` can not have getInitialProps/getServerProps, https://err.sh/zeit/next.js/404-get-initial-props`
exportconstPAGES_404_GET_INITIAL_PROPS_ERROR=`\`pages/404\` can not have getInitialProps/getServerSideProps, https://err.sh/zeit/next.js/404-get-initial-props`